Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: normalize test config #643

Merged
merged 4 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 9 additions & 136 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@commitlint/cli": "^17.6.7",
"@commitlint/config-conventional": "^17.6.7",
"@metamask/eslint-config-nodejs": "^11.0.1",
"ava": "^5.2.0",
"ava": "^5.3.1",
"conventional-changelog-conventionalcommits": "^6.1.0",
"cross-env": "^7.0.3",
"depcheck": "^1.4.0",
Expand Down Expand Up @@ -52,5 +52,11 @@
"lerna>nx>@parcel/watcher": false,
"$root$": true
}
},
"ava": {
"files": [
"packages/*/test/*.spec.js"
],
"timeout": "2m"
}
}
8 changes: 7 additions & 1 deletion packages/aa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"scripts": {
"test": "npm run test:run",
"test:run": "ava --timeout=30s test/index.js",
"test:run": "ava",
Copy link
Member

@naugtur naugtur Aug 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(can be ignored) IMHO the arguments are more convenient as one can copy the call and modify/extend without thinking of the configuration elsewhere, but I'm ok with this change as it provides benefits elsewhere. Consistency is more valuable than copy-pasting.

"lint": "npm run lint:eslint && npm run lint:deps",
"lint:eslint": "eslint .",
"lint:fix": "eslint . --fix",
Expand All @@ -33,5 +33,11 @@
"author": "kumavis",
"engines": {
"node": ">=14.0.0"
},
"ava": {
"files": [
"test/*.spec.js"
],
"timeout": "30s"
}
}
File renamed without changes.
10 changes: 8 additions & 2 deletions packages/allow-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"scripts": {
"test": "npm run test:run",
"test:run": "ava --timeout=30s test/index.js",
"test:run": "ava",
"test:prep": "for d in ./test/projects/*/ ; do (cd \"$d\" && ../../../src/cli.js auto --experimental-bins); done",
"lint": "npm run lint:eslint && npm run lint:deps",
"lint:eslint": "eslint .",
Expand All @@ -48,5 +48,11 @@
"homepage": "https://github.com/LavaMoat/LavaMoat/tree/main/packages/allow-scripts",
"engines": {
"node": ">=14.0.0"
}
},
"ava": {
"files": [
"test/*.spec.js"
],
"timeout": "30s"
}
}
7 changes: 0 additions & 7 deletions packages/browserify/ava.config.cjs

This file was deleted.

9 changes: 8 additions & 1 deletion packages/browserify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"watchify": "^4.0.0"
},
"scripts": {
"test": "ava --timeout 2m --concurrency 1",
"test": "ava",
"test:prep": "WRITE_AUTO_POLICY=1 ./test/fixtures/secureBundling/run.sh",
"lint": "npm run lint:eslint && npm run lint:deps",
"lint:eslint": "eslint .",
Expand All @@ -61,5 +61,12 @@
"allowScripts": {
"keccak": false
}
},
"ava": {
"files": [
"test/*.spec.js"
],
"timeout": "2m",
"concurrency": 1
}
}
8 changes: 7 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"lint:eslint": "eslint .",
"lint:fix": "eslint --fix .",
"lint:deps": "depcheck",
"test": "ava --timeout=30s test/index.js",
"test": "ava",
"lib:ses": "echo 'disabled SES overwrite in this branch'; exit 1 #cp ../../node_modules/ses/dist/lockdown.umd.js ./lib/lockdown.umd.js"
},
"author": "kumavis",
Expand All @@ -42,5 +42,11 @@
"templateRequire": "readonly",
"lockdown": "readonly"
}
},
"ava": {
"files": [
"test/*.spec.js"
],
"timeout": "30s"
}
}
File renamed without changes.
File renamed without changes.
7 changes: 0 additions & 7 deletions packages/core/test/index.js

This file was deleted.

10 changes: 7 additions & 3 deletions packages/lavapack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
"lint:eslint": "eslint .",
"lint:fix": "eslint . --fix",
"lint:deps": "depcheck",
"test": "npm run test:ava && npm run test:ecma",
"test:ava": "ava --timeout=30s test/index.js",
"test:ecma": "node test/runtimeEcma.js",
"test": "ava",
"rebuild": "npm run build",
"build": "node ./src/build-runtime.js"
},
Expand All @@ -46,5 +44,11 @@
"url": "https://github.com/LavaMoat/lavamoat/issues"
},
"homepage": "https://github.com/LavaMoat/lavamoat#readme",
"ava": {
"files": [
"test/*.spec.js"
],
"timeout": "30s"
},
"gitHead": "28a238fc4c3d55650bd2ba9a3603b1f275567286"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const test = require('ava')
const { pipe, from, concat } = require('mississippi')
const { SourceMapConsumer } = require('source-map')
const convertSourceMap = require('convert-source-map')
const pack = require('../')
const pack = require('../src')


test('dummy test', (t) => {
Expand Down Expand Up @@ -70,7 +70,7 @@ test('sourcemap test', async (t) => {
const bundleLine = bundleString.split('\n')[bundleStartPos.line - 1]
console.log(`${sourceFile}:\n${bundleLine}`)
})

consumer.destroy()
t.pass('no error thrown')
})
Expand All @@ -89,4 +89,4 @@ function deferred () {
}
})
return result
}
}
18 changes: 0 additions & 18 deletions packages/lavapack/test/runtimeEcma.js

This file was deleted.

Loading
Loading