chore: fix tests test + karma tests

This commit is contained in:
fryorcraken.eth 2022-11-03 22:40:42 +11:00
parent e901e7f69d
commit 55192a2774
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
11 changed files with 14 additions and 47 deletions

View File

@ -18,24 +18,9 @@ module.exports = function (config) {
},
},
webpack: {
mode: "production",
mode: "development",
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",
},
],
rules: [{ test: /\.([cm]?ts|tsx)$/, loader: "ts-loader" }],
},
plugins: [
new webpack.DefinePlugin({
@ -46,7 +31,12 @@ module.exports = function (config) {
}),
],
resolve: {
extensions: [".ts", ".js"],
extensions: [".ts", ".tsx", ".js"],
extensionAlias: {
".js": [".js", ".ts"],
".cjs": [".cjs", ".cts"],
".mjs": [".mjs", ".mts"],
},
},
stats: { warnings: false },
devtool: "inline-source-map",

View File

@ -1,6 +0,0 @@
{
"extends": "./tsconfig.dev",
"compilerOptions": {
"noEmit": false
}
}

View File

@ -1,6 +0,0 @@
{
"extends": "./tsconfig.dev",
"compilerOptions": {
"noEmit": false
}
}

View File

@ -1,6 +0,0 @@
{
"extends": "./tsconfig.dev",
"compilerOptions": {
"noEmit": false
}
}

View File

@ -56,6 +56,7 @@
},
"dependencies": {
"@waku/core": "*",
"@waku/enr": "*",
"@waku/create": "*",
"@waku/interfaces": "*",
"@waku/byte-utils": "*"

View File

@ -1,6 +1,6 @@
import { ENR } from "@waku/core/lib/enr";
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
import { createPrivacyNode } from "@waku/create";
import { ENR } from "@waku/enr";
import type { WakuPrivacy } from "@waku/interfaces";
import { Protocols } from "@waku/interfaces";
import { expect } from "chai";

View File

@ -1,4 +1,4 @@
import { bytesToUtf8, utf8ToBytes } from "@waku/core/lib/utils";
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
import { DecoderV0, EncoderV0 } from "@waku/core/lib/waku_message/version_0";
import { createFullNode } from "@waku/create";

View File

@ -1,4 +1,4 @@
import { bytesToUtf8, utf8ToBytes } from "@waku/core/lib/utils";
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
import { EncoderV0 } from "@waku/core/lib/waku_message/version_0";
import { createFullNode } from "@waku/create";

View File

@ -1,11 +1,11 @@
import { PeerId } from "@libp2p/interface-peer-id";
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
import {
DefaultPubSubTopic,
generatePrivateKey,
generateSymmetricKey,
getPublicKey,
} from "@waku/core";
import { bytesToUtf8, utf8ToBytes } from "@waku/core/lib/utils";
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
import {
DecoderV0,

View File

@ -1,7 +1,7 @@
import type { PeerId } from "@libp2p/interface-peer-id";
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
import { generateSymmetricKey } from "@waku/core";
import { PeerDiscoveryStaticPeers } from "@waku/core/lib/peer_discovery_static_list";
import { bytesToUtf8, utf8ToBytes } from "@waku/core/lib/utils";
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
import { SymDecoder, SymEncoder } from "@waku/core/lib/waku_message/version_1";
import { createLightNode, createPrivacyNode } from "@waku/create";

View File

@ -1,6 +0,0 @@
{
"extends": "./tsconfig.dev",
"compilerOptions": {
"noEmit": false
}
}