test: re-introduce build

This commit is contained in:
fryorcraken.eth 2022-11-02 13:53:26 +11:00
parent b11d465a9d
commit 5ba1ee12c7
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
7 changed files with 19 additions and 9 deletions

View File

@ -1,7 +1,7 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
project: "./tsconfig.json",
project: "./tsconfig.dev.json",
},
rules: {
"@typescript-eslint/no-non-null-assertion": "off",

View File

@ -1,6 +1,6 @@
{
"extension": ["ts"],
"spec": "tests/**/*.spec.ts",
"spec": "tests/*.spec.ts",
"require": ["ts-node/register", "isomorphic-fetch", "jsdom-global/register"],
"loader": "ts-node/esm",
"node-option": [

View File

@ -4,9 +4,9 @@ const webpack = require("webpack");
module.exports = function (config) {
config.set({
frameworks: ["webpack", "mocha"],
files: ["src/lib/**/!(node).spec.ts"],
files: ["tests/**/!(node).spec.ts"],
preprocessors: {
"src/lib/**/!(node).spec.ts": ["webpack"],
"tests/**/!(node).spec.ts": ["webpack"],
},
envPreprocessor: ["CI"],
reporters: ["progress"],

View File

@ -41,6 +41,7 @@
"privacy"
],
"scripts": {
"build": "tsc",
"fix": "run-s fix:*",
"fix:prettier": "prettier . --write",
"fix:lint": "eslint src tests --ext .ts --ext .cjs --fix",
@ -50,8 +51,8 @@
"nwaku:build": "(PROC=$(nproc --all 2>/dev/null || echo 2); cd ../../nwaku; make -j$PROC update; NIMFLAGS=\"-d:chronicles_colors=off -d:chronicles_sinks=textlines -d:chronicles_log_level=TRACE\" make -j$PROC wakunode2)",
"nwaku:force-build": "(cd ../../nwaku && rm -rf ./build/ ./vendor) && run-s nwaku:build",
"check": "run-s check:*",
"check:lint": "eslint src tests --ext .ts",
"check:prettier": "prettier . --list-different",
"check:lint": "eslint src tests --ext .ts",
"check:spelling": "cspell \"{README.md,{tests,src}/**/*.ts}\"",
"check:tsc": "tsc -p tsconfig.json",
"test": "run-s test:*",

View File

@ -0,0 +1,8 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"module": "esnext",
"noEmit": true
},
"include": ["src", "tests"]
}

View File

@ -2,9 +2,9 @@
"compilerOptions": {
"incremental": true,
"target": "es2020",
"noEmit": true,
"outDir": "dist/",
"moduleResolution": "node",
"module": "esnext",
"module": "es2020",
"declaration": true,
"sourceMap": true,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
@ -44,7 +44,8 @@
"types": ["node", "mocha"],
"typeRoots": ["node_modules/@types", "src/types"]
},
"include": ["tests", "src"],
"include": ["src"],
"exclude": [],
"compileOnSave": false,
"ts-node": {
"files": true

View File

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