Skip to content

Commit

Permalink
Fix Windows path problem
Browse files Browse the repository at this point in the history
  • Loading branch information
hudochenkov committed Jan 10, 2020
1 parent 04ec577 commit 644b713
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/__tests__/printConfig.test.js
Expand Up @@ -3,15 +3,18 @@
const path = require('path');
const pluginWarnAboutFoo = require('./fixtures/plugin-warn-about-foo');
const printConfig = require('../printConfig');
const replaceBackslashes = require('./replaceBackslashes');

it('printConfig uses getConfigForFile to retrieve the config', () => {
const filepath = path.join(__dirname, 'fixtures/getConfigForFile/a/b/foo.css');
const filepath = replaceBackslashes(
path.join(__dirname, 'fixtures/getConfigForFile/a/b/foo.css'),
);

return printConfig({
files: [filepath],
}).then((result) => {
expect(result).toEqual({
plugins: [path.join(__dirname, '/fixtures/plugin-warn-about-foo.js')],
plugins: [replaceBackslashes(path.join(__dirname, '/fixtures/plugin-warn-about-foo.js'))],
rules: {
'block-no-empty': [true],
'plugin/warn-about-foo': ['always'],
Expand Down

0 comments on commit 644b713

Please sign in to comment.