Skip to content

Commit

Permalink
Add vitest globals
Browse files Browse the repository at this point in the history
  • Loading branch information
yongholeeme committed Dec 17, 2024
1 parent ad28ede commit 1ef7d84
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
18 changes: 18 additions & 0 deletions data/vitest.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export default {
afterAll: false,
afterEach: false,
assert: false,
assertType: false,
beforeAll: false,
beforeEach: false,
describe: false,
expect: false,
expectTypeOf: false,
it: false,
onTestFailed: false,
onTestFinished: false,
suite: false,
test: false,
vi: false,
vitest: false,
};
18 changes: 18 additions & 0 deletions globals.json
Original file line number Diff line number Diff line change
Expand Up @@ -2656,6 +2656,24 @@
"uniq": false,
"which": false
},
"vitest": {
"afterAll": false,
"afterEach": false,
"assert": false,
"assertType": false,
"beforeAll": false,
"beforeEach": false,
"describe": false,
"expect": false,
"expectTypeOf": false,
"it": false,
"onTestFailed": false,
"onTestFinished": false,
"suite": false,
"test": false,
"vi": false,
"vitest": false
},
"webextensions": {
"browser": false,
"chrome": false,
Expand Down
3 changes: 3 additions & 0 deletions scripts/generate-data.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ async function getData() {
environments.map(async environment => ({environment, globals: await readGlobals(environment)})),
);

console.log({data})

Check failure on line 16 in scripts/generate-data.mjs

View workflow job for this annotation

GitHub Actions / Node.js 20

Missing semicolon.

Check failure on line 16 in scripts/generate-data.mjs

View workflow job for this annotation

GitHub Actions / Node.js 18

Missing semicolon.
console.log(data.map(({environment, globals}) => [environment, globals]))

Check failure on line 17 in scripts/generate-data.mjs

View workflow job for this annotation

GitHub Actions / Node.js 20

Missing semicolon.

Check failure on line 17 in scripts/generate-data.mjs

View workflow job for this annotation

GitHub Actions / Node.js 18

Missing semicolon.
return Object.fromEntries(data.map(({environment, globals}) => [environment, globals]));
}

const data = await getData();
// console.log({data})

Check failure on line 22 in scripts/generate-data.mjs

View workflow job for this annotation

GitHub Actions / Node.js 20

Comments should not begin with a lowercase character.

Check failure on line 22 in scripts/generate-data.mjs

View workflow job for this annotation

GitHub Actions / Node.js 18

Comments should not begin with a lowercase character.
await fs.writeFile(DATA_FILE, JSON.stringify(data, undefined, '\t') + '\n');

0 comments on commit 1ef7d84

Please sign in to comment.