Skip to content

Commit

Permalink
chore(.mocharc.json): no asyncOnly
Browse files Browse the repository at this point in the history
bhsd-harry committed Dec 23, 2024
1 parent 611c400 commit 29eb560
Showing 7 changed files with 13 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -26,4 +26,6 @@ jobs:
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm prune --omit=dev
- run: npm i --save-dev mocha
- run: npm test
5 changes: 5 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"diff": false,
"spec": "server/dist/test/*.js",
"ignore": "server/dist/test/util.js"
}
1 change: 1 addition & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -10,3 +10,4 @@ assets/
*.sh
.eslintcache*
.gitignore
.mocharc.json
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
[![VSCode Marketplace: WikiParser Language Server](https://vsmarketplacebadges.dev/version-short/bhsd.vscode-extension-wikiparser.webp?color=blueviolet&logo=visual-studio-code&style=?style=for-the-badge)](https://marketplace.visualstudio.com/items?itemName=Bhsd.vscode-extension-wikiparser)
[![CodeQL](https://github.com/bhsd-harry/vscode-extension-wikiparser/actions/workflows/codeql.yml/badge.svg)](https://github.com/bhsd-harry/vscode-extension-wikiparser/actions/workflows/codeql.yml)
[![CI](https://github.com/bhsd-harry/vscode-extension-wikiparser/actions/workflows/node.js.yml/badge.svg)](https://github.com/bhsd-harry/vscode-extension-wikiparser/actions/workflows/node.js.yml)
[![codebeat badge](https://codebeat.co/badges/5d0a34e8-ed10-4f28-b1a2-4b23123a85f8)](https://codebeat.co/projects/github-com-bhsd-harry-vscode-extension-wikiparser-main)

This is a language server extension for Visual Studio Code that provides language supports for the [Wikitext](https://www.mediawiki.org/wiki/Wikitext) language.

6 changes: 0 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -50,12 +50,6 @@
"lint:json": "v8r -s server/src/data/schema/info.json server/src/data/*.json",
"lint": "npm run lint:ts && npm run lint:json"
},
"mocha": {
"asyncOnly": true,
"diff": false,
"spec": "server/dist/test/*.js",
"ignore": "server/dist/test/util.js"
},
"dependencies": {
"@bhsd/common": "^0.5.0",
"color-rgba": "^3.0.0",
3 changes: 1 addition & 2 deletions server/src/test/diagnostic.ts
Original file line number Diff line number Diff line change
@@ -77,8 +77,7 @@ describe('diagnosticProvider', () => {
it('Diagnostic', async () => {
assert.deepStrictEqual(await diagnose(params), diagnostics);
});
it('QuickFix', done => {
it('QuickFix', () => {
assert.deepStrictEqual(quickFix({...params, context: {diagnostics}} as unknown as CodeActionParams), actions);
done();
});
});
9 changes: 3 additions & 6 deletions server/src/test/json.ts
Original file line number Diff line number Diff line change
@@ -10,28 +10,25 @@ const {doubleUnderscore, parserFunction} = Parser.getConfig(),
.map(s => s.toLowerCase());

describe('JSON data', () => {
it('behaviorSwitch.json', done => {
it('behaviorSwitch.json', () => {
const words = behaviorSwitch.flatMap(({aliases}) => aliases);
assert.equal(words.length, new Set(words).size, 'Duplicate magic words');
for (const word of words) {
assert.ok(doubleUnderscores.includes(word), `Missing: ${word}`);
}
done();
});
it('parserFunction.json', done => {
it('parserFunction.json', () => {
const words = parserFunctions.flatMap(({aliases}) => aliases);
assert.equal(words.length, new Set(words).size, 'Duplicate magic words');
for (const word of words) {
assert.ok(magicWords.includes(word), `Missing: ${word}`);
}
done();
});
it('variable.json', done => {
it('variable.json', () => {
const words = variable.flatMap(({aliases}) => aliases);
assert.equal(words.length, new Set(words).size, 'Duplicate magic words');
for (const word of words) {
assert.ok(magicWords.includes(word), `Missing: ${word}`);
}
done();
});
});

0 comments on commit 29eb560

Please sign in to comment.