Skip to content

Commit 92eab6f

Browse files
committed
test: simplify
1 parent 425e062 commit 92eab6f

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

tests/__snapshots__/rollup.test.ts.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

3-
exports[`rollup > tests/fixtures/ElCard.vue 1`] = `
3+
exports[`rollup > fixtures/ElCard.vue 1`] = `
44
"// ElCard.js
55
import { defineComponent, createElementBlock, openBlock, renderSlot } from 'vue';
66
@@ -20,7 +20,7 @@ export { ElCard, ElCard as default };
2020
"
2121
`;
2222

23-
exports[`rollup > tests/fixtures/UPPER-CASE.vue 1`] = `
23+
exports[`rollup > fixtures/UPPER-CASE.vue 1`] = `
2424
"// UPPER-CASE.js
2525
import { defineComponent } from 'vue';
2626
@@ -38,7 +38,7 @@ export { UpperCase, UpperCase as default };
3838
"
3939
`;
4040

41-
exports[`rollup > tests/fixtures/basic.vue 1`] = `
41+
exports[`rollup > fixtures/basic.vue 1`] = `
4242
"// basic.js
4343
import { defineComponent, createElementBlock, openBlock, renderSlot } from 'vue';
4444
@@ -58,7 +58,7 @@ export { Basic, Basic as default };
5858
"
5959
`;
6060

61-
exports[`rollup > tests/fixtures/el-button.vue 1`] = `
61+
exports[`rollup > fixtures/el-button.vue 1`] = `
6262
"// el-button.js
6363
import { defineComponent, createElementBlock, openBlock, renderSlot } from 'vue';
6464
@@ -78,7 +78,7 @@ export { ElButton, ElButton as default };
7878
"
7979
`;
8080

81-
exports[`rollup > tests/fixtures/my_button.vue 1`] = `
81+
exports[`rollup > fixtures/my_button.vue 1`] = `
8282
"// my_button.js
8383
import { defineComponent, createElementBlock, openBlock, renderSlot } from 'vue';
8484

tests/rollup.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import path from 'node:path'
21
import { rollupBuild, testFixtures } from '@sxzz/test-utils'
32
import Oxc from 'unplugin-oxc/rollup'
43
import Vue from 'unplugin-vue/rollup'
@@ -7,7 +6,7 @@ import VueNamedExport from '../src/vite'
76

87
describe('rollup', async () => {
98
await testFixtures(
10-
['tests/fixtures/*.vue'],
9+
'fixtures/*.vue',
1110
async (args, id) =>
1211
(
1312
await rollupBuild(id, [
@@ -16,6 +15,9 @@ describe('rollup', async () => {
1615
Oxc(),
1716
])
1817
).snapshot,
19-
{ cwd: path.resolve(__dirname, '..'), promise: true },
18+
{
19+
cwd: import.meta.dirname,
20+
promise: true,
21+
},
2022
)
2123
})

0 commit comments

Comments
 (0)