Skip to content

Commit f657858

Browse files
committed
test: fix for window os
1 parent a4516bc commit f657858

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test/test-cfg-resolve.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import test from 'ava';
22
import path from 'path';
33
import cfgResolve from '../lib/cfg-resolve';
4+
import normalizePath from 'normalize-path';
45

56
test('should return function', t => {
67
t.true(typeof cfgResolve === 'function');
@@ -20,7 +21,7 @@ test('should return simple config', t => {
2021
const config = cfgResolve({input, flags});
2122
const expected = {
2223
allInOutput: false,
23-
input: [path.resolve('input.html')],
24+
input: [normalizePath(path.resolve('input.html'))],
2425
options: {},
2526
output: undefined,
2627
plugins: {
@@ -107,7 +108,7 @@ test('should return config when input param from config', t => {
107108
config: 'test/config/.config-input'
108109
};
109110
const config = cfgResolve({flags});
110-
const expected = [path.resolve('src/**/*.html')];
111+
const expected = [normalizePath(path.resolve('src/**/*.html'))];
111112

112113
t.deepEqual(config.input, expected);
113114
});
@@ -129,7 +130,7 @@ test('should return config when CLI input param priority', t => {
129130
config: 'test/config/.config-input-priority'
130131
};
131132
const config = cfgResolve({input, flags});
132-
const expected = [path.resolve('src/template/**/*.html')];
133+
const expected = [normalizePath(path.resolve('src/template/**/*.html'))];
133134

134135
t.deepEqual(config.input, expected);
135136
});
@@ -146,12 +147,12 @@ test('should return config when CLI output param priority', t => {
146147
t.deepEqual(config.output, expected);
147148
});
148149

149-
test('should resolve plugins set via config and stdin (use) in order', async t => {
150+
test('should resolve plugins set via config and stdin (use) in order', t => {
150151
const input = 'input.html';
151152
const flags = {
152153
use: ['posthtml-d', 'posthtml-bem'],
153-
posthtmlBem: { foo: 'after' },
154-
posthtmlD: { bar: 'before' },
154+
posthtmlBem: {foo: 'after'},
155+
posthtmlD: {bar: 'before'},
155156
config: 'test/config/.config-plugins'
156157
};
157158
const config = cfgResolve({input, flags});

0 commit comments

Comments
 (0)