From 90aa1f80af3c41050ee87a1a736be62cf25b113e Mon Sep 17 00:00:00 2001 From: Berislav Date: Thu, 25 Oct 2018 02:48:02 -0700 Subject: [PATCH] Import assert for each test file --- lib/exposure/testing/client.js | 1 + lib/exposure/testing/units/units.js | 1 + lib/graphql/testing/astToBody.test.js | 1 + lib/graphql/testing/astToQuery.test.js | 1 + lib/links/tests/main.js | 1 + lib/namedQuery/testing/client.test.js | 1 + lib/namedQuery/testing/server.test.js | 1 + lib/query/counts/testing/client.test.js | 1 + lib/query/testing/client.test.js | 1 + lib/query/testing/link-cache/server.test.js | 1 + lib/query/testing/metaFilters.server.test.js | 1 + lib/query/testing/reducers.client.test.js | 1 + lib/query/testing/reducers.server.test.js | 1 + lib/query/testing/security.client.test.js | 1 + lib/query/testing/server.test.js | 1 + lib/testing/main.js | 3 --- package.js | 3 --- 17 files changed, 15 insertions(+), 6 deletions(-) mode change 100644 => 100755 lib/exposure/testing/client.js mode change 100644 => 100755 lib/exposure/testing/units/units.js mode change 100644 => 100755 lib/graphql/testing/astToBody.test.js mode change 100644 => 100755 lib/graphql/testing/astToQuery.test.js mode change 100644 => 100755 lib/links/tests/main.js mode change 100644 => 100755 lib/query/counts/testing/client.test.js mode change 100644 => 100755 lib/query/testing/metaFilters.server.test.js mode change 100644 => 100755 lib/query/testing/security.client.test.js delete mode 100755 lib/testing/main.js diff --git a/lib/exposure/testing/client.js b/lib/exposure/testing/client.js old mode 100644 new mode 100755 index ab35b37..b8492c4 --- a/lib/exposure/testing/client.js +++ b/lib/exposure/testing/client.js @@ -1,3 +1,4 @@ +import { assert } from 'chai'; import Demo, { DemoMethod, DemoPublication diff --git a/lib/exposure/testing/units/units.js b/lib/exposure/testing/units/units.js old mode 100644 new mode 100755 index af11c1f..a812e09 --- a/lib/exposure/testing/units/units.js +++ b/lib/exposure/testing/units/units.js @@ -1,3 +1,4 @@ +import { assert } from 'chai'; import restrictFields from '../../lib/restrictFields.js'; import enforceMaxLimit from '../../lib/enforceMaxLimit.js'; import cleanBody from '../../lib/cleanBody.js'; diff --git a/lib/graphql/testing/astToBody.test.js b/lib/graphql/testing/astToBody.test.js old mode 100644 new mode 100755 index 7488f23..acd3897 --- a/lib/graphql/testing/astToBody.test.js +++ b/lib/graphql/testing/astToBody.test.js @@ -1,3 +1,4 @@ +import { assert } from 'chai'; import astToBody, { Symbols } from '../lib/astToBody'; import ast from './ast.js'; diff --git a/lib/graphql/testing/astToQuery.test.js b/lib/graphql/testing/astToQuery.test.js old mode 100644 new mode 100755 index 0fa93e9..645c044 --- a/lib/graphql/testing/astToQuery.test.js +++ b/lib/graphql/testing/astToQuery.test.js @@ -1,3 +1,4 @@ +import { assert } from 'chai'; import { Symbols } from '../lib/astToBody'; import astToQuery, { diff --git a/lib/links/tests/main.js b/lib/links/tests/main.js old mode 100644 new mode 100755 index 66d23cd..63b08bf --- a/lib/links/tests/main.js +++ b/lib/links/tests/main.js @@ -1,3 +1,4 @@ +import { assert } from 'chai'; //import { // PostCollection, // CategoryCollection, diff --git a/lib/namedQuery/testing/client.test.js b/lib/namedQuery/testing/client.test.js index d0aa1dd..f23f6c9 100755 --- a/lib/namedQuery/testing/client.test.js +++ b/lib/namedQuery/testing/client.test.js @@ -1,3 +1,4 @@ +import { assert } from 'chai'; import postListExposure from './bootstrap/queries/postListExposure.js'; import postListExposureScoped from './bootstrap/queries/postListExposureScoped'; import userListScoped from './bootstrap/queries/userListScoped'; diff --git a/lib/namedQuery/testing/server.test.js b/lib/namedQuery/testing/server.test.js index baa1b68..c9c43ab 100755 --- a/lib/namedQuery/testing/server.test.js +++ b/lib/namedQuery/testing/server.test.js @@ -1,3 +1,4 @@ +import { assert } from 'chai'; import { postList, postListCached, diff --git a/lib/query/counts/testing/client.test.js b/lib/query/counts/testing/client.test.js old mode 100644 new mode 100755 index 0e1cbd5..bd2f137 --- a/lib/query/counts/testing/client.test.js +++ b/lib/query/counts/testing/client.test.js @@ -1,3 +1,4 @@ +import { assert } from 'chai'; import { Tracker } from 'meteor/tracker'; import PostsCollection from './bootstrap/collection.test'; import NamedQuery, { diff --git a/lib/query/testing/client.test.js b/lib/query/testing/client.test.js index e51f2c0..9ac090d 100755 --- a/lib/query/testing/client.test.js +++ b/lib/query/testing/client.test.js @@ -1,3 +1,4 @@ +import { assert } from 'chai'; import { createQuery } from 'meteor/cultofcoders:grapher'; import './reducers.client.test'; import './security.client.test'; diff --git a/lib/query/testing/link-cache/server.test.js b/lib/query/testing/link-cache/server.test.js index cc60716..3438c03 100755 --- a/lib/query/testing/link-cache/server.test.js +++ b/lib/query/testing/link-cache/server.test.js @@ -1,3 +1,4 @@ +import { assert } from 'chai'; import createFixtures from './fixtures'; import { createQuery } from 'meteor/cultofcoders:grapher'; import { diff --git a/lib/query/testing/metaFilters.server.test.js b/lib/query/testing/metaFilters.server.test.js old mode 100644 new mode 100755 index 241e508..7c89a7c --- a/lib/query/testing/metaFilters.server.test.js +++ b/lib/query/testing/metaFilters.server.test.js @@ -1,3 +1,4 @@ +import { assert } from 'chai'; import { createQuery } from 'meteor/cultofcoders:grapher'; describe('Hypernova - $meta filters', function () { diff --git a/lib/query/testing/reducers.client.test.js b/lib/query/testing/reducers.client.test.js index 3c78538..8d36982 100755 --- a/lib/query/testing/reducers.client.test.js +++ b/lib/query/testing/reducers.client.test.js @@ -1,3 +1,4 @@ +import { assert } from 'chai'; import { createQuery } from 'meteor/cultofcoders:grapher'; import waitForHandleToBeReady from './lib/waitForHandleToBeReady'; diff --git a/lib/query/testing/reducers.server.test.js b/lib/query/testing/reducers.server.test.js index 613c91b..1b39ac6 100755 --- a/lib/query/testing/reducers.server.test.js +++ b/lib/query/testing/reducers.server.test.js @@ -1,3 +1,4 @@ +import { assert } from 'chai'; import { createQuery } from 'meteor/cultofcoders:grapher'; import Authors from './bootstrap/authors/collection'; import Comments from './bootstrap/comments/collection'; diff --git a/lib/query/testing/security.client.test.js b/lib/query/testing/security.client.test.js old mode 100644 new mode 100755 index ac4cd4e..2b7c97d --- a/lib/query/testing/security.client.test.js +++ b/lib/query/testing/security.client.test.js @@ -1,3 +1,4 @@ +import { assert } from 'chai'; import { createQuery } from 'meteor/cultofcoders:grapher'; import waitForHandleToBeReady from './lib/waitForHandleToBeReady'; diff --git a/lib/query/testing/server.test.js b/lib/query/testing/server.test.js index 4c53bd4..ec647fa 100755 --- a/lib/query/testing/server.test.js +++ b/lib/query/testing/server.test.js @@ -1,3 +1,4 @@ +import { assert } from 'chai'; import { createQuery } from 'meteor/cultofcoders:grapher'; import dot from 'dot-object'; import Comments from './bootstrap/comments/collection.js'; diff --git a/lib/testing/main.js b/lib/testing/main.js deleted file mode 100755 index e19100b..0000000 --- a/lib/testing/main.js +++ /dev/null @@ -1,3 +0,0 @@ -import chai from 'chai'; - -global.assert = chai.assert; diff --git a/package.js b/package.js index 738a962..529a032 100755 --- a/package.js +++ b/package.js @@ -59,9 +59,6 @@ Package.onTest(function(api) { api.use(['meteortesting:mocha']); - // main test config - api.addFiles('lib/testing/main.js'); - // LINKS api.addFiles('lib/links/tests/main.js', 'server');