Skip to content

Commit

Permalink
Adjust the rest fixtures and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Sep 26, 2023
1 parent 8e09fcd commit 28ba933
Show file tree
Hide file tree
Showing 26 changed files with 60 additions and 20 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 4 additions & 1 deletion fixtures/internal/package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"name": "@fixtures/internal"
"name": "@fixtures/internal",
"scripts": {
"test": "node --test"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 4 additions & 1 deletion fixtures/jsdoc-exports/package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"name": "@fixtures/production-strict-test"
"name": "@fixtures/production-strict-test",
"scripts": {
"test": "node --test"
}
}
1 change: 1 addition & 0 deletions fixtures/plugin-config/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
include: ['**/*.vitest.ts'],
environment: 'happy-dom',
},
});

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

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

5 changes: 5 additions & 0 deletions fixtures/plugins/vitest-entry/node_modules/vitest/config.js

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

Empty file.

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

6 changes: 6 additions & 0 deletions fixtures/plugins/vitest-entry/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "@fixtures/vitest-entry",
"devDependencies": {
"vitest": "*"
}
}
5 changes: 5 additions & 0 deletions fixtures/plugins/vitest-entry/src/basic.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { expect, test } from 'vitest';

test('Unit A', () => {
expect(true).toBe(!false);
});
5 changes: 5 additions & 0 deletions fixtures/plugins/vitest-entry/src/unit.vitest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { expect, test } from 'vitest';

test('Unit A', () => {
expect(true).toBe(!false);
});
7 changes: 7 additions & 0 deletions fixtures/plugins/vitest-entry/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
include: ['**/*.vitest.ts'],
},
});
2 changes: 0 additions & 2 deletions fixtures/workspaces-nested/L-1-1/L-1-2/L-1-3/index.spec.ts

This file was deleted.

2 changes: 0 additions & 2 deletions fixtures/workspaces-nested/L-1-1/L-1-2/index.spec.ts

This file was deleted.

2 changes: 0 additions & 2 deletions fixtures/workspaces-nested/L-1-1/index.spec.ts

This file was deleted.

3 changes: 1 addition & 2 deletions fixtures/workspaces-plugin-config/knip.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"vitest": {
"config": ["vitest.config.ts"],
"entry": ["**/*.vitest.ts"]
"config": ["config/vitest.config.ts"]
},
"workspaces": {
"packages/*": {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
include: ['**/*.vitest.ts'],
environment: 'happy-dom',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineProject } from 'vitest/config';

export default defineProject({
test: {
include: ['**/*.vitest.ts'],
environment: 'jsdom',
},
});
2 changes: 1 addition & 1 deletion tests/internal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test('Report internal exports (production)', async () => {
isProduction: true,
});

assert(issues.exports['helpers.ts']['internalHelper']);
assert(issues.exports['helpers.js']['internalHelper']);

assert.deepEqual(counters, {
...baseCounters,
Expand Down
18 changes: 9 additions & 9 deletions tests/jsdoc-exports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ test('Find exports from jsdoc @type tags', async () => {
cwd,
});

assert(issues.exports['module.ts']['alphaFn']);
assert(issues.exports['module.ts']['internalUnusedFn']);
assert(issues.exports['module.ts']['invalidTaggedFn']);
assert(issues.exports['module.ts']['unusedFn']);
assert(issues.exports['module.js']['alphaFn']);
assert(issues.exports['module.js']['internalUnusedFn']);
assert(issues.exports['module.js']['invalidTaggedFn']);
assert(issues.exports['module.js']['unusedFn']);

assert.deepEqual(counters, {
...baseCounters,
Expand All @@ -33,11 +33,11 @@ test('Find exports from jsdoc @type tags (production)', async () => {
isProduction: true,
});

assert(issues.exports['module.ts']['alphaFn']);
assert(issues.exports['module.ts']['internalFn']);
assert(issues.exports['module.ts']['internalUnusedFn']);
assert(issues.exports['module.ts']['invalidTaggedFn']);
assert(issues.exports['module.ts']['unusedFn']);
assert(issues.exports['module.js']['alphaFn']);
assert(issues.exports['module.js']['internalFn']);
assert(issues.exports['module.js']['internalUnusedFn']);
assert(issues.exports['module.js']['invalidTaggedFn']);
assert(issues.exports['module.js']['unusedFn']);

assert.deepEqual(counters, {
...baseCounters,
Expand Down

0 comments on commit 28ba933

Please sign in to comment.