fix(exportVariables/test): wrap in test (#12992)

pull/12997/head
Delmer 2019-03-28 18:08:06 -04:00 committed by GitHub
parent 133b131617
commit 47d52f890f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 7 deletions

View File

@ -41,15 +41,17 @@ class FakeFetcher implements ValueFetcher {
describe('hydrate vars', () => {
describe('exportVariables', () => {
const a = createVariable('a', 'f(x: v.b, v.c)')
const b = createVariable('b', 'beep')
const c = createVariable('c', 'robit')
const d = createVariable('d', 'nooooo!')
const vars = [a, b, c, d]
test('should find variable exports', () => {
const a = createVariable('a', 'f(x: v.b, v.c)')
const b = createVariable('b', 'beep')
const c = createVariable('c', 'robit')
const d = createVariable('d', 'nooooo!')
const vars = [a, b, c, d]
const actual = exportVariables([a], vars)
const actual = exportVariables([a], vars)
expect(actual).toEqual([a, b, c])
expect(actual).toEqual([a, b, c])
})
})
test('should invalidate cyclic subgraphs', async () => {