forked from ugolino/excluded-uni-airdrop-users
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
31 lines (26 loc) · 1.06 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Libraries
const {exec} = require("child_process");
// There is one single test here that takes a lot of time,
// so we must set a high timeout threshold.
jest.setTimeout(1000000);
describe("Given all of the known accounts to interact with Uniswap", () => {
describe("and all of the proposed accounts from projects in this repo", () => {
test("every proposed account is also in the set of known accounts", async () => {
const scriptOutput = await new Promise((accept, reject) => {
exec("./scripts/compare_addresses", (err, stdout, stderr) => {
if (err) {
reject(stderr);
}
accept(stdout);
});
});
// Each line of output is an account that isn't contained in the
// list of valid accounts.
const invalidAccounts = scriptOutput
.trim()
.split("\n")
.filter(Boolean);
expect(invalidAccounts).toEqual([]);
});
});
});