test: add unit tests to pipeline

This commit is contained in:
2023-05-31 15:33:19 +02:00
parent 45444d9373
commit 495a63977c
29 changed files with 232 additions and 484 deletions

View File

@@ -10,7 +10,8 @@
"types": "./lib/index.d.ts",
"scripts": {
"build": "tsup --dts",
"format": "prettier . --ignore-path ../../.gitignore",
"docs": "typedoc --json ./docs/docs.json --options ../../typedoc.base.json src/index.ts",
"format": "prettier . -c --ignore-path ../../.gitignore",
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
"lint": "eslint --ext .ts src/",
"lint:fix": "eslint --fix --ext .ts src/",
@@ -29,11 +30,12 @@
"@types/chai": "4.3.5",
"@types/mocha": "10.0.1",
"@types/node": "18.15.3",
"c8": "7.13.0",
"c8": "7.14.0",
"chai": "4.3.7",
"mocha": "10.2.0",
"ts-node": "10.9.1",
"tsup": "6.7.0"
"tsup": "6.7.0",
"typedoc": "0.24.7"
},
"tsup": {
"entry": [

View File

@@ -26,7 +26,10 @@ const tests = await Promise.all(
})),
);
describe('Easy AST', async function () {
describe('Easy AST', function () {
this.timeout(5000);
this.slow(2000);
it('should build the project', function () {
const project = lightweightProjectFromPath(projectPath, true);
expect(Object.keys(project).length).to.equal(tests.length);