graphql-tag
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -42,2 +42,5 @@ var parse = require('graphql/language/parser').parse; | ||
// Support typescript, which isn't as nice as Babel about default exports | ||
gql.default = gql; | ||
module.exports = gql; |
{ | ||
"name": "graphql-tag", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A JavaScript template literal tag that parses GraphQL queries", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
17
test.js
@@ -1,12 +0,15 @@ | ||
import gql from './index'; | ||
var gqlRequire = require('./index'); | ||
var gqlDefault = require('./index').default; | ||
import { assert } from 'chai'; | ||
describe('gql', () => { | ||
it('parses queries', () => { | ||
assert.equal(gql`{ testQuery }`.kind, 'Document'); | ||
}); | ||
[gqlRequire, gqlDefault].forEach((gql, i) => { | ||
describe(`gql ${i}`, () => { | ||
it('parses queries', () => { | ||
assert.equal(gql`{ testQuery }`.kind, 'Document'); | ||
}); | ||
it('returns the same object for the same query', () => { | ||
assert.isTrue(gql`{ sameQuery }` === gql`{ sameQuery }`); | ||
it('returns the same object for the same query', () => { | ||
assert.isTrue(gql`{ sameQuery }` === gql`{ sameQuery }`); | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4571
44