20 lines
491 B
TypeScript
20 lines
491 B
TypeScript
import { assert } from "chai";
|
|
import { buddy } from "./solution";
|
|
|
|
|
|
describe("buddy", function() {
|
|
|
|
function testing(start: number, limit: number, expect:number[]) {
|
|
let actual = buddy(start, limit);
|
|
assert.deepEqual(actual, expect);
|
|
}
|
|
|
|
it("Basic tests", function() {
|
|
testing(10, 50, [48, 75] );
|
|
testing(1071625, 1103735, [1081184, 1331967] );
|
|
testing(57345, 90061, [62744, 75495] );
|
|
testing(2382, 3679, [] );
|
|
|
|
})
|
|
});
|