@apollion-dsi/scripts 0.9.1 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/lib/config/env.js +9 -4
- package/lib/config/env.js.map +1 -1
- package/package.json +3 -3
- package/src/config/env.ts +11 -5
- package/coverage/clover.xml +0 -147
- package/coverage/coverage-final.json +0 -9
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/config/env.ts.html +0 -400
- package/coverage/lcov-report/config/index.html +0 -146
- package/coverage/lcov-report/config/paths.ts.html +0 -442
- package/coverage/lcov-report/config/shared.ts.html +0 -211
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -131
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/utils/buildWrapperArgs.ts.html +0 -196
- package/coverage/lcov-report/utils/checkRequiredFiles.ts.html +0 -178
- package/coverage/lcov-report/utils/formatWebpackMessages.ts.html +0 -214
- package/coverage/lcov-report/utils/getPublicUrlOrPath.ts.html +0 -259
- package/coverage/lcov-report/utils/index.html +0 -176
- package/coverage/lcov-report/utils/resolveBin.ts.html +0 -193
- package/coverage/lcov.info +0 -288
- package/src/__tests__/buildWrapperArgs.test.ts +0 -73
- package/src/__tests__/checkRequiredFiles.test.ts +0 -44
- package/src/__tests__/env.test.ts +0 -51
- package/src/__tests__/formatWebpackMessages.test.ts +0 -42
- package/src/__tests__/getPublicUrlOrPath.test.ts +0 -38
- package/src/__tests__/paths.test.ts +0 -47
- package/src/__tests__/resolveBin.test.ts +0 -68
- package/src/__tests__/shared.test.ts +0 -14
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { buildWrapperArgs } from '../utils/buildWrapperArgs';
|
|
2
|
-
|
|
3
|
-
describe('buildWrapperArgs', () => {
|
|
4
|
-
const lintOptions = { defaults: ['src', '--quiet'], target: 'src' };
|
|
5
|
-
const prettierOptions = {
|
|
6
|
-
defaults: ['--check', 'src/**/*.{ts,tsx,json,css,md}'],
|
|
7
|
-
target: 'src/**/*.{ts,tsx,json,css,md}',
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
describe('lint wrapper semantics', () => {
|
|
11
|
-
it('falls back to defaults when no user args', () => {
|
|
12
|
-
expect(buildWrapperArgs([], lintOptions)).toEqual(['src', '--quiet']);
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
it('returns a fresh defaults copy (does not alias the input array)', () => {
|
|
16
|
-
const defaults = ['src', '--quiet'];
|
|
17
|
-
const result = buildWrapperArgs([], { defaults, target: 'src' });
|
|
18
|
-
|
|
19
|
-
expect(result).not.toBe(defaults);
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('appends target after a single flag (lint --fix)', () => {
|
|
23
|
-
expect(buildWrapperArgs(['--fix'], lintOptions)).toEqual(['--fix', 'src']);
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it('appends target after --flag=value form', () => {
|
|
27
|
-
expect(buildWrapperArgs(['--max-warnings=0'], lintOptions)).toEqual(['--max-warnings=0', 'src']);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it('appends target after --flag value (space-separated) form', () => {
|
|
31
|
-
// Regression: previously the literal `0` was misread as a path,
|
|
32
|
-
// dropping `src` from the eslint invocation so it ran with no files.
|
|
33
|
-
expect(buildWrapperArgs(['--max-warnings', '0'], lintOptions)).toEqual(['--max-warnings', '0', 'src']);
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it('strips a POSIX `--` end-of-options marker before appending target', () => {
|
|
37
|
-
// Regression: the `--` previously survived into argv, so eslint
|
|
38
|
-
// treated `--fix` and `src` as positional file arguments and failed
|
|
39
|
-
// with "No files matching pattern '--fix'".
|
|
40
|
-
expect(buildWrapperArgs(['--', '--fix'], lintOptions)).toEqual(['--fix', 'src']);
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it('strips multiple `--` markers (defensive)', () => {
|
|
44
|
-
expect(buildWrapperArgs(['--', '--fix', '--'], lintOptions)).toEqual(['--fix', 'src']);
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it('preserves the order of user flags', () => {
|
|
48
|
-
expect(buildWrapperArgs(['--cache', '--max-warnings=0', '--fix'], lintOptions)).toEqual([
|
|
49
|
-
'--cache',
|
|
50
|
-
'--max-warnings=0',
|
|
51
|
-
'--fix',
|
|
52
|
-
'src',
|
|
53
|
-
]);
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
describe('prettier wrapper semantics', () => {
|
|
58
|
-
it('falls back to --check + DEFAULT_GLOB when no user args', () => {
|
|
59
|
-
expect(buildWrapperArgs([], prettierOptions)).toEqual(['--check', 'src/**/*.{ts,tsx,json,css,md}']);
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
it('appends DEFAULT_GLOB after --write', () => {
|
|
63
|
-
expect(buildWrapperArgs(['--write'], prettierOptions)).toEqual(['--write', 'src/**/*.{ts,tsx,json,css,md}']);
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
it('strips the `--` separator before appending DEFAULT_GLOB', () => {
|
|
67
|
-
expect(buildWrapperArgs(['--', '--write'], prettierOptions)).toEqual([
|
|
68
|
-
'--write',
|
|
69
|
-
'src/**/*.{ts,tsx,json,css,md}',
|
|
70
|
-
]);
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
});
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import os from 'os';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
|
|
5
|
-
import checkRequiredFiles from '../utils/checkRequiredFiles';
|
|
6
|
-
|
|
7
|
-
describe('checkRequiredFiles', () => {
|
|
8
|
-
let tmpDir: string;
|
|
9
|
-
let logSpy: jest.SpyInstance;
|
|
10
|
-
|
|
11
|
-
beforeEach(() => {
|
|
12
|
-
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'apollion-scripts-'));
|
|
13
|
-
logSpy = jest.spyOn(console, 'log').mockImplementation(() => undefined);
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
afterEach(() => {
|
|
17
|
-
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
18
|
-
logSpy.mockRestore();
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it('returns true when every file exists', () => {
|
|
22
|
-
const fileA = path.join(tmpDir, 'a.txt');
|
|
23
|
-
const fileB = path.join(tmpDir, 'b.txt');
|
|
24
|
-
fs.writeFileSync(fileA, '');
|
|
25
|
-
fs.writeFileSync(fileB, '');
|
|
26
|
-
|
|
27
|
-
expect(checkRequiredFiles([fileA, fileB])).toBe(true);
|
|
28
|
-
expect(logSpy).not.toHaveBeenCalled();
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it('returns false and logs the missing file when one is absent', () => {
|
|
32
|
-
const present = path.join(tmpDir, 'present.txt');
|
|
33
|
-
const missing = path.join(tmpDir, 'missing.txt');
|
|
34
|
-
fs.writeFileSync(present, '');
|
|
35
|
-
|
|
36
|
-
expect(checkRequiredFiles([present, missing])).toBe(false);
|
|
37
|
-
const logs = logSpy.mock.calls.flat().join(' ');
|
|
38
|
-
expect(logs).toContain('missing.txt');
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
it('returns true for an empty list', () => {
|
|
42
|
-
expect(checkRequiredFiles([])).toBe(true);
|
|
43
|
-
});
|
|
44
|
-
});
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import getClientEnvironment, { getEnviroment } from '../config/env';
|
|
2
|
-
|
|
3
|
-
describe('getClientEnvironment', () => {
|
|
4
|
-
const savedEnv = { ...process.env };
|
|
5
|
-
afterEach(() => {
|
|
6
|
-
process.env = { ...savedEnv };
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
it('exposes REACT_APP_* vars in raw and stringified', () => {
|
|
10
|
-
process.env.REACT_APP_API_URL = 'https://api.example.com';
|
|
11
|
-
process.env.SECRET_KEY = 'leak-me-not';
|
|
12
|
-
process.env.NODE_ENV = 'production';
|
|
13
|
-
|
|
14
|
-
const result = getClientEnvironment('/public/', { useFastRefresh: false });
|
|
15
|
-
const raw = result.raw as Record<string, unknown>;
|
|
16
|
-
|
|
17
|
-
expect(raw.REACT_APP_API_URL).toBe('https://api.example.com');
|
|
18
|
-
expect(raw.PUBLIC_URL).toBe('/public/');
|
|
19
|
-
expect(raw.NODE_ENV).toBe('production');
|
|
20
|
-
expect(raw.FAST_REFRESH).toBe(false);
|
|
21
|
-
|
|
22
|
-
expect(raw).not.toHaveProperty('SECRET_KEY');
|
|
23
|
-
expect((result.stringified['process.env'] as Record<string, string>).PUBLIC_URL).toBe('"/public/"');
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it('defaults NODE_ENV to "development" when unset', () => {
|
|
27
|
-
delete process.env.NODE_ENV;
|
|
28
|
-
const result = getClientEnvironment('/', { useFastRefresh: true });
|
|
29
|
-
expect(result.raw.NODE_ENV).toBe('development');
|
|
30
|
-
expect(result.raw.FAST_REFRESH).toBe(true);
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
describe('getEnviroment', () => {
|
|
35
|
-
const savedEnv = { ...process.env };
|
|
36
|
-
afterEach(() => {
|
|
37
|
-
process.env = { ...savedEnv };
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it('throws when NODE_ENV is unset', () => {
|
|
41
|
-
delete process.env.NODE_ENV;
|
|
42
|
-
expect(() => getEnviroment({ dotenv: '/tmp/nonexistent.env' } as never)).toThrow(
|
|
43
|
-
/NODE_ENV environment variable is required/,
|
|
44
|
-
);
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it('completes silently when no dotenv files exist', () => {
|
|
48
|
-
process.env.NODE_ENV = 'test';
|
|
49
|
-
expect(() => getEnviroment({ dotenv: '/tmp/definitely-missing.env' } as never)).not.toThrow();
|
|
50
|
-
});
|
|
51
|
-
});
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import formatWebpackMessages from '../utils/formatWebpackMessages';
|
|
2
|
-
|
|
3
|
-
describe('formatWebpackMessages', () => {
|
|
4
|
-
it('returns empty arrays when the input has no errors or warnings', () => {
|
|
5
|
-
expect(formatWebpackMessages(null)).toEqual({ errors: [], warnings: [] });
|
|
6
|
-
expect(formatWebpackMessages({})).toEqual({ errors: [], warnings: [] });
|
|
7
|
-
expect(formatWebpackMessages({ errors: 'not-array' })).toEqual({ errors: [], warnings: [] });
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
it('coerces string entries verbatim', () => {
|
|
11
|
-
expect(formatWebpackMessages({ errors: ['boom'], warnings: ['ouch'] })).toEqual({
|
|
12
|
-
errors: ['boom'],
|
|
13
|
-
warnings: ['ouch'],
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it('prefixes object messages with their moduleName', () => {
|
|
18
|
-
expect(
|
|
19
|
-
formatWebpackMessages({
|
|
20
|
-
errors: [{ moduleName: 'src/a.ts', message: 'syntax error' }],
|
|
21
|
-
warnings: [{ message: 'unused export' }],
|
|
22
|
-
}),
|
|
23
|
-
).toEqual({
|
|
24
|
-
errors: ['in src/a.ts\n\nsyntax error'],
|
|
25
|
-
warnings: ['unused export'],
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
it('stringifies unknown object shapes', () => {
|
|
30
|
-
expect(formatWebpackMessages({ errors: [{ code: 42 }] })).toEqual({
|
|
31
|
-
errors: ['{"code":42}'],
|
|
32
|
-
warnings: [],
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it('coerces primitives to string', () => {
|
|
37
|
-
expect(formatWebpackMessages({ errors: [42, true] })).toEqual({
|
|
38
|
-
errors: ['42', 'true'],
|
|
39
|
-
warnings: [],
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
});
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import getPublicUrlOrPath from '../utils/getPublicUrlOrPath';
|
|
2
|
-
|
|
3
|
-
describe('getPublicUrlOrPath', () => {
|
|
4
|
-
describe('with envPublicUrl', () => {
|
|
5
|
-
it('returns the URL with trailing slash in production', () => {
|
|
6
|
-
expect(getPublicUrlOrPath(false, undefined, 'https://cdn.example.com/app')).toBe('https://cdn.example.com/app/');
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
it('returns absolute pathname in development for absolute URL', () => {
|
|
10
|
-
expect(getPublicUrlOrPath(true, undefined, 'https://cdn.example.com/app/')).toBe('/app/');
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('returns root in development when URL starts with "."', () => {
|
|
14
|
-
expect(getPublicUrlOrPath(true, undefined, './nested/')).toBe('/');
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
describe('with homepage only', () => {
|
|
19
|
-
it('returns the pathname in production for absolute homepage', () => {
|
|
20
|
-
expect(getPublicUrlOrPath(false, 'https://example.com/app/', undefined)).toBe('/app/');
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it('returns root in development for absolute homepage', () => {
|
|
24
|
-
expect(getPublicUrlOrPath(true, 'https://example.com/app', undefined)).toBe('/app/');
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it('returns relative homepage in production when starting with "."', () => {
|
|
28
|
-
expect(getPublicUrlOrPath(false, './app/', undefined)).toBe('./app/');
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
describe('with neither', () => {
|
|
33
|
-
it('returns root', () => {
|
|
34
|
-
expect(getPublicUrlOrPath(true, undefined, undefined)).toBe('/');
|
|
35
|
-
expect(getPublicUrlOrPath(false, undefined, undefined)).toBe('/');
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
});
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import os from 'os';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
|
|
5
|
-
describe('createAppPaths', () => {
|
|
6
|
-
let tmpDir: string;
|
|
7
|
-
let savedCwd: string;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
tmpDir = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), 'apollion-scripts-paths-')));
|
|
11
|
-
fs.writeFileSync(path.join(tmpDir, 'package.json'), JSON.stringify({ name: 'fixture', homepage: '/app/' }));
|
|
12
|
-
fs.writeFileSync(path.join(tmpDir, 'scriptsrc.js'), 'module.exports = { output: "dist" };');
|
|
13
|
-
fs.mkdirSync(path.join(tmpDir, 'src'));
|
|
14
|
-
fs.writeFileSync(path.join(tmpDir, 'src', 'index.tsx'), '// fixture entry');
|
|
15
|
-
fs.writeFileSync(path.join(tmpDir, 'src', 'setupTests.ts'), '// fixture setup');
|
|
16
|
-
savedCwd = process.cwd();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
afterEach(() => {
|
|
20
|
-
process.chdir(savedCwd);
|
|
21
|
-
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
22
|
-
jest.resetModules();
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it('resolves every well-known path against the supplied base', () => {
|
|
26
|
-
process.chdir(tmpDir);
|
|
27
|
-
const { createAppPaths } = require('../config/paths');
|
|
28
|
-
const result = createAppPaths(tmpDir);
|
|
29
|
-
|
|
30
|
-
expect(result.appPath).toBe(tmpDir);
|
|
31
|
-
expect(result.appPackageJson).toBe(path.join(tmpDir, 'package.json'));
|
|
32
|
-
expect(result.appBuild).toBe(path.join(tmpDir, 'dist'));
|
|
33
|
-
expect(result.appHtml).toBe(path.join(tmpDir, 'public/index.html'));
|
|
34
|
-
expect(result.appIndexJs).toBe(path.join(tmpDir, 'src/index.tsx'));
|
|
35
|
-
expect(result.testsSetup).toBe(path.join(tmpDir, 'src/setupTests.ts'));
|
|
36
|
-
expect(result.moduleFileExtensions).toContain('tsx');
|
|
37
|
-
expect(result.publicUrlOrPath).toBe('/app/');
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it('falls back to a `.js` extension when no source file matches', () => {
|
|
41
|
-
fs.rmSync(path.join(tmpDir, 'src', 'index.tsx'));
|
|
42
|
-
process.chdir(tmpDir);
|
|
43
|
-
const { createAppPaths } = require('../config/paths');
|
|
44
|
-
const result = createAppPaths(tmpDir);
|
|
45
|
-
expect(result.appIndexJs).toBe(path.join(tmpDir, 'src/index.js'));
|
|
46
|
-
});
|
|
47
|
-
});
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import os from 'os';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
|
|
5
|
-
import { resolveBin } from '../utils/resolveBin';
|
|
6
|
-
|
|
7
|
-
describe('resolveBin', () => {
|
|
8
|
-
let tmpRoot: string;
|
|
9
|
-
|
|
10
|
-
beforeEach(() => {
|
|
11
|
-
tmpRoot = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), 'apollion-scripts-resolveBin-')));
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
afterEach(() => {
|
|
15
|
-
fs.rmSync(tmpRoot, { recursive: true, force: true });
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
function makeFakePkg(name: string, binField: unknown, binFiles: string[] = []): void {
|
|
19
|
-
const pkgDir = path.join(tmpRoot, 'node_modules', name);
|
|
20
|
-
fs.mkdirSync(pkgDir, { recursive: true });
|
|
21
|
-
fs.writeFileSync(path.join(pkgDir, 'package.json'), JSON.stringify({ name, version: '0.0.0', bin: binField }));
|
|
22
|
-
|
|
23
|
-
for (const file of binFiles) {
|
|
24
|
-
const target = path.join(pkgDir, file);
|
|
25
|
-
fs.mkdirSync(path.dirname(target), { recursive: true });
|
|
26
|
-
fs.writeFileSync(target, '#!/usr/bin/env node\n');
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
it('resolves a string-style bin field', () => {
|
|
31
|
-
makeFakePkg('faketool-a', './bin/cli.js', ['bin/cli.js']);
|
|
32
|
-
|
|
33
|
-
const resolved = resolveBin('faketool-a', 'faketool-a', tmpRoot);
|
|
34
|
-
|
|
35
|
-
expect(resolved).toBe(path.join(tmpRoot, 'node_modules', 'faketool-a', 'bin', 'cli.js'));
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
it('resolves a map-style bin field via the pkg name by default', () => {
|
|
39
|
-
makeFakePkg('faketool-b', { 'faketool-b': './bin/main.js', other: './bin/other.js' }, [
|
|
40
|
-
'bin/main.js',
|
|
41
|
-
'bin/other.js',
|
|
42
|
-
]);
|
|
43
|
-
|
|
44
|
-
const resolved = resolveBin('faketool-b', 'faketool-b', tmpRoot);
|
|
45
|
-
|
|
46
|
-
expect(resolved).toBe(path.join(tmpRoot, 'node_modules', 'faketool-b', 'bin', 'main.js'));
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('resolves a map-style bin field via an explicit alternative name', () => {
|
|
50
|
-
makeFakePkg('faketool-c', { 'faketool-c': './bin/main.js', alt: './bin/alt.js' }, ['bin/main.js', 'bin/alt.js']);
|
|
51
|
-
|
|
52
|
-
const resolved = resolveBin('faketool-c', 'alt', tmpRoot);
|
|
53
|
-
|
|
54
|
-
expect(resolved).toBe(path.join(tmpRoot, 'node_modules', 'faketool-c', 'bin', 'alt.js'));
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
it('throws if the package has no bin field', () => {
|
|
58
|
-
makeFakePkg('faketool-d', undefined);
|
|
59
|
-
|
|
60
|
-
expect(() => resolveBin('faketool-d', 'faketool-d', tmpRoot)).toThrow(/no "bin" field/);
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
it('throws if the requested bin name is missing from the map', () => {
|
|
64
|
-
makeFakePkg('faketool-e', { 'faketool-e': './bin/main.js' }, ['bin/main.js']);
|
|
65
|
-
|
|
66
|
-
expect(() => resolveBin('faketool-e', 'missing', tmpRoot)).toThrow(/no bin named "missing"/);
|
|
67
|
-
});
|
|
68
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { defaultDevConfig } from '../config/shared';
|
|
2
|
-
|
|
3
|
-
describe('defaultDevConfig', () => {
|
|
4
|
-
it('exposes the expected dev defaults', () => {
|
|
5
|
-
expect(defaultDevConfig).toEqual({
|
|
6
|
-
port: 3000,
|
|
7
|
-
host: '0.0.0.0',
|
|
8
|
-
head: { title: 'Apollion' },
|
|
9
|
-
constants: {},
|
|
10
|
-
i18nConfig: {},
|
|
11
|
-
useFastRefresh: true,
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
});
|