diff --git a/packages/create/package.json b/packages/create/package.json index ec25796597..02b0fb8d36 100644 --- a/packages/create/package.json +++ b/packages/create/package.json @@ -2,7 +2,6 @@ "name": "@waku/create", "version": "0.0.1", "description": "Easily create a Waku node", - "main": "./dist/index.js", "types": "./dist/index.d.ts", "module": "./dist/index.js", "exports": { @@ -11,13 +10,6 @@ "import": "./dist/index.js" } }, - "typesVersions": { - "*": { - "lib/*": [ - "dist/lib/*" - ] - } - }, "type": "module", "author": "Waku Team", "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/create#readme", diff --git a/packages/tests/karma.conf.cjs b/packages/tests/karma.conf.cjs deleted file mode 100644 index daa7293fc1..0000000000 --- a/packages/tests/karma.conf.cjs +++ /dev/null @@ -1,55 +0,0 @@ -process.env.CHROME_BIN = require("puppeteer").executablePath(); -const webpack = require("webpack"); - -module.exports = function (config) { - config.set({ - frameworks: ["webpack", "mocha"], - files: ["tests/**/!(node).spec.ts"], - preprocessors: { - "tests/**/!(node).spec.ts": ["webpack"], - }, - envPreprocessor: ["CI"], - reporters: ["progress"], - browsers: ["ChromeHeadless"], - singleRun: true, - client: { - mocha: { - timeout: 6000, // Default is 2s - }, - }, - webpack: { - mode: "production", - module: { - rules: [ - { - test: /\.(js|tsx?)$/, - use: [ - { - loader: "ts-loader", - options: { configFile: "tsconfig.karma.json" }, - }, - ], - exclude: /(node_modules)|(node\.spec\.ts)/, - }, - { - test: /node\.spec\.ts$/, - use: "ignore-loader", - }, - ], - }, - plugins: [ - new webpack.DefinePlugin({ - "process.env.CI": process.env.CI || false, - }), - new webpack.ProvidePlugin({ - process: "process/browser.js", - }), - ], - resolve: { - extensions: [".ts", ".js"], - }, - stats: { warnings: false }, - devtool: "inline-source-map", - }, - }); -}; diff --git a/packages/tests/package.json b/packages/tests/package.json index ee663da492..50056b14b3 100644 --- a/packages/tests/package.json +++ b/packages/tests/package.json @@ -3,7 +3,6 @@ "private": true, "version": "0.0.1", "description": "Waku tests", - "main": "./dist/index.js", "types": "./dist/index.d.ts", "module": "./dist/index.js", "exports": { @@ -12,13 +11,6 @@ "import": "./dist/index.js" } }, - "typesVersions": { - "*": { - "lib/*": [ - "dist/lib/*" - ] - } - }, "type": "module", "author": "Waku Team", "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/tests#readme", @@ -57,7 +49,6 @@ "check:tsc": "tsc -p tsconfig.json", "test": "run-s test:*", "test:node": "TS_NODE_PROJECT=./tsconfig.json mocha", - "test:browser": "karma start karma.conf.cjs", "reset-hard": "git clean -dfx -e .idea && git reset --hard && npm i && npm run build" }, "engines": { diff --git a/packages/tests/tests/relay.node.spec.ts b/packages/tests/tests/relay.node.spec.ts index bab30edce3..cef9e21c88 100644 --- a/packages/tests/tests/relay.node.spec.ts +++ b/packages/tests/tests/relay.node.spec.ts @@ -1,6 +1,6 @@ import { PeerId } from "@libp2p/interface-peer-id"; -import { DefaultPubSubTopic } from "@waku/core"; import { + DefaultPubSubTopic, generatePrivateKey, generateSymmetricKey, getPublicKey, diff --git a/packages/tests/tests/waku.spec.ts b/packages/tests/tests/waku.spec.ts deleted file mode 100644 index a55da2c16e..0000000000 --- a/packages/tests/tests/waku.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { PeerId } from "@libp2p/interface-peer-id"; -import { createLightNode } from "@waku/create"; -import type { WakuLight } from "@waku/interfaces"; -import { expect } from "chai"; - -describe("Waku Dial", function () { - describe("Bootstrap [live data]", function () { - let waku: WakuLight; - - afterEach(function () { - !!waku && waku.stop().catch((e) => console.log("Waku failed to stop", e)); - }); - - before(function () { - if (process.env.CI) { - this.skip(); - } - }); - - it("Enabling default [live data]", async function () { - // This test depends on fleets.status.im being online. - // This dependence must be removed once DNS discovery is implemented - this.timeout(20_000); - - waku = await createLightNode({ - defaultBootstrap: true, - }); - await waku.start(); - - const connectedPeerID: PeerId = await new Promise((resolve) => { - waku.libp2p.connectionManager.addEventListener( - "peer:connect", - (evt) => { - resolve(evt.detail.remotePeer); - } - ); - }); - - expect(connectedPeerID).to.not.be.undefined; - }); - }); -});