Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export an object from the CSS-in-JS syntax (#4824)
- Loading branch information
1 parent
5b6b996
commit 7cf0c36
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use strict'; | ||
|
||
const syntaxes = require('../syntaxes/index'); | ||
|
||
const inputs = Object.keys(syntaxes).map((name) => [ | ||
name, | ||
require(`../syntaxes/syntax-${name}.js`), // directly require modules to bypass importLazy() in syntaxes/index.js | ||
]); | ||
|
||
describe('syntaxes', () => { | ||
it.each(inputs)('syntax is an object with parse and stringify keys: %s', (name, module) => { | ||
expect(module).toMatchObject({ | ||
parse: expect.any(Function), | ||
stringify: expect.any(Function), | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
'use strict'; | ||
|
||
module.exports = require('@stylelint/postcss-css-in-js'); | ||
module.exports = require('@stylelint/postcss-css-in-js')(); |