Skip to content

Commit d4173ef

Browse files
committed
fix linter
1 parent c6d5611 commit d4173ef

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

lib/cmd/vite/plugins/client-env.test.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,12 @@ describe('createClientEnvCollector', () => {
4848
});
4949

5050
it('transform collects a single env var reference', () => {
51-
const collector = createClientEnvCollector(tmpOutputPath());
51+
const out = tmpOutputPath();
52+
const collector = createClientEnvCollector(out);
5253
const p = collector.plugin();
5354

5455
p.transform('const x = process.env.MY_VAR;');
55-
56-
const vars = [];
57-
58-
// Inspect by writing to disk
59-
const out = tmpOutputPath();
60-
const c2 = createClientEnvCollector(out);
61-
const p2 = c2.plugin();
62-
63-
p2.transform('const x = process.env.MY_VAR;');
64-
return c2.write().then(result => {
56+
return collector.write().then(result => {
6557
expect(result).toEqual(['MY_VAR']);
6658
});
6759
});

0 commit comments

Comments
 (0)