Skip to content

Commit adedf78

Browse files
committed
Better tests for custom syntaxes
1 parent 37e25aa commit adedf78

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed
File renamed without changes.

test/test-custom-parser.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
describe('custom parser', function () {
22

33
it('processes sugarss', function () {
4-
var css = require('!raw-loader!../!' +
5-
'./cases/sugar.css');
6-
expect(css).toEqual('a\n color: rgba(255, 0, 0, 0.1)\n');
4+
var css = require('!raw-loader!../?parser=sugarss!' +
5+
'./cases/sugar.sss');
6+
expect(css).toEqual('a {\n color: blue\n}\n');
77
});
88

99
});

test/webpack-custom-parser.config.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
var path = require('path');
2-
var sugarss = require('sugarss');
32

4-
var blue = require('./plugins/blue');
5-
var red = require('./plugins/red');
63
var RewritePlugin = require('./webpack-plugins/rewrite.js');
74

85
module.exports = {
@@ -13,12 +10,6 @@ module.exports = {
1310
filename: 'test-custom-parser.test.js',
1411
path: path.join(__dirname, '..', 'build')
1512
},
16-
postcss: function () {
17-
return {
18-
syntax: sugarss,
19-
plugins: [blue, red({ alpha: 0.1 })]
20-
};
21-
},
2213
plugins: [
2314
new RewritePlugin()
2415
]

0 commit comments

Comments
 (0)