feat: add mocha to dns-discovery (#1154)

This commit is contained in:
Sasha 2023-02-11 22:25:11 +01:00 committed by GitHub
parent 596c71a962
commit f945eb90c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2828 additions and 26926 deletions

29736
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
{
"extension": ["ts"],
"spec": "src/**/*.spec.ts",
"require": ["ts-node/register", "isomorphic-fetch"],
"loader": "ts-node/esm",
"node-option": [
"experimental-specifier-resolution=node",
"loader=ts-node/esm"
],
"exit": true
}

View File

@ -51,7 +51,9 @@
"check:spelling": "cspell \"{README.md,src/**/*.ts}\"",
"check:tsc": "tsc -p tsconfig.dev.json",
"prepublish": "npm run build",
"reset-hard": "git clean -dfx -e .idea && git reset --hard && npm i && npm run build"
"reset-hard": "git clean -dfx -e .idea && git reset --hard && npm i && npm run build",
"test": "run-s test:*",
"test:node": "TS_NODE_PROJECT=./tsconfig.dev.json mocha"
},
"engines": {
"node": ">=16"
@ -87,6 +89,7 @@
"eslint-plugin-functional": "^5.0.4",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"mocha": "^10.2.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.4",
"rollup": "^3.14.0",

View File

@ -86,6 +86,8 @@ describe("DNS Node Discovery [live data]", function () {
});
it(`should retrieve ${maxQuantity} multiaddrs for test.waku.nodes.status.im`, async function () {
if (process.env.CI) this.skip();
this.timeout(10000);
// Google's dns server address. Needs to be set explicitly to run in CI
const dnsNodeDiscovery = DnsNodeDiscovery.dnsOverHttp();