WIP - add extractor, generate snippet_data
This commit is contained in:
14
node_modules/babel-plugin-macros/dist/__tests__/create-macros.js
generated
vendored
Normal file
14
node_modules/babel-plugin-macros/dist/__tests__/create-macros.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
const {createMacro} = require('../')
|
||||
|
||||
test('throws error if it is not transpiled', () => {
|
||||
const untranspiledMacro = createMacro(() => {})
|
||||
expect(() =>
|
||||
untranspiledMacro({source: 'untranspiled.macro'}),
|
||||
).toThrowErrorMatchingSnapshot()
|
||||
})
|
||||
|
||||
test('attempting to create a macros with the configName of options throws an error', () => {
|
||||
expect(() =>
|
||||
createMacro(() => {}, {configName: 'options'}),
|
||||
).toThrowErrorMatchingSnapshot()
|
||||
})
|
||||
Reference in New Issue
Block a user