Skip to content

Commit

Permalink
Add snapshot for createGate babel test
Browse files Browse the repository at this point in the history
  • Loading branch information
zerobias committed Jun 28, 2022
1 parent 5fe8149 commit 4c66ccf
Showing 1 changed file with 121 additions and 0 deletions.
121 changes: 121 additions & 0 deletions src/babel/__tests__/__snapshots__/babel-plugin.test.js.snap
Expand Up @@ -1559,6 +1559,127 @@ const f = () =>
"
`;

exports[`babel-plugin should createGate 1`] = `
"var _effectorFileName = '/src/babel/__tests__/fixtures/createGate.js'
import {createGate} from 'effector-react'
import {createGate as createGateScope} from 'effector-react/scope'
{
const Empty = createGate({
and: [],
or: {
loc: {
file: _effectorFileName,
line: 5,
column: 16,
},
name: 'Empty',
sid: '96s88f',
},
})
const Name = createGate({
and: ['Foo'],
or: {
loc: {
file: _effectorFileName,
line: 6,
column: 15,
},
name: 'Name',
sid: '-lwgh1v',
},
})
const ConfigObject = createGate({
and: [
{
defaultState: 0,
},
],
or: {
loc: {
file: _effectorFileName,
line: 7,
column: 23,
},
name: 'ConfigObject',
sid: 'xd3ucl',
},
})
const config = {
defaultState: 0,
}
const ConfigVariable = createGate({
and: [config],
or: {
loc: {
file: _effectorFileName,
line: 9,
column: 25,
},
name: 'ConfigVariable',
sid: '3xf7ku',
},
})
}
{
const Empty = createGateScope({
and: [],
or: {
loc: {
file: _effectorFileName,
line: 13,
column: 16,
},
name: 'Empty',
sid: 'gizoyq',
},
})
const Name = createGateScope({
and: ['Foo'],
or: {
loc: {
file: _effectorFileName,
line: 14,
column: 15,
},
name: 'Name',
sid: 'wyq1no',
},
})
const ConfigObject = createGateScope({
and: [
{
defaultState: 0,
},
],
or: {
loc: {
file: _effectorFileName,
line: 15,
column: 23,
},
name: 'ConfigObject',
sid: 'r95b1s',
},
})
const config = {
defaultState: 0,
}
const ConfigVariable = createGateScope({
and: [config],
or: {
loc: {
file: _effectorFileName,
line: 17,
column: 25,
},
name: 'ConfigVariable',
sid: '9qp1qn',
},
})
}
"
`;

exports[`babel-plugin should debug sids with options 1`] = `
"import {
createDomain,
Expand Down

0 comments on commit 4c66ccf

Please sign in to comment.