Skip to content

Commit

Permalink
test(*): fix path for tests files
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Demidov committed Nov 22, 2016
1 parent 49b14e7 commit a4110a0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
"modDlmtr": "-"
},
"styleToFile": {
"path": "./dist/styleToFile.css"
"path": "test/dist/styleToFile.css"
}
}
}
2 changes: 1 addition & 1 deletion test/fixtures/posthtml.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"encoding": "utf-8"
},
"styleToFile": {
"path": "dist/style.css"
"path": "test/dist/style.css"
}
}
12 changes: 6 additions & 6 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ test('Plugin return array', t => {

test('Plugin reads custom json config from posthtml.json', async t => {
t.is(
(await read('expected/output-config-pkg.html')),
(await posthtml(plugin('fixtures/posthtml.json')).process(await read('fixtures/input.html'))).html
(await read('test/expected/output-config-pkg.html')),
(await posthtml(plugin('test/fixtures/posthtml.json')).process(await read('test/fixtures/input.html'))).html
);
});

test('test witch posthtml-css-modules', async t => {
t.is(
(await read('expected/output-modules.html')),
(await posthtml(plugin('fixtures/modules.json', {'posthtml-css-modules': 'dist/css-modules.json', 'posthtml-each': {}})).process(await read('fixtures/input-modules.html'))).html
(await read('test/expected/output-modules.html')),
(await posthtml(plugin('test/fixtures/modules.json', {'posthtml-css-modules': 'test/dist/css-modules.json', 'posthtml-each': {}})).process(await read('test/fixtures/input-modules.html'))).html
);
});

test('should throw not install plugin posthtml-css', async t => {
t.is(
(await read('expected/output-config-pkg.html')),
(await posthtml(plugin('fixtures/posthtml.json', {css: {}, postcss: {}})).process(await read('fixtures/input.html'))).html
(await read('test/expected/output-config-pkg.html')),
(await posthtml(plugin('test/fixtures/posthtml.json', {css: {}, postcss: {}})).process(await read('test/fixtures/input.html'))).html
);
});

0 comments on commit a4110a0

Please sign in to comment.