-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.js
More file actions
17 lines (15 loc) · 519 Bytes
/
test.js
File metadata and controls
17 lines (15 loc) · 519 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import process from 'node:process';
import fs from 'node:fs';
import path from 'node:path';
import test from 'ava';
import webpack from 'webpack';
import {temporaryDirectory} from 'tempy';
import pify from 'pify';
delete process.env.NODE_ENV;
test('main', async t => {
const {default: config} = await import('./fixture/webpack.config.js');
const cwd = temporaryDirectory();
config.output.path = cwd;
await pify(webpack)(config);
t.regex(fs.readFileSync(path.join(cwd, 'unicorn.js'), 'utf8'), /development/);
});