]> git.wincent.com - hextrapolate.git/commitdiff
Port tests to structure desired by create-react-app
authorGreg Hurrell <greg@hurrell.net>
Wed, 31 May 2017 14:27:57 +0000 (07:27 -0700)
committerGreg Hurrell <greg@hurrell.net>
Wed, 31 May 2017 14:27:57 +0000 (07:27 -0700)
.watchmanconfig [new file with mode: 0644]
src/__mocks__/.eslintrc [deleted file]
src/__mocks__/sinon.js [deleted file]
src/__tests__/.eslintrc [deleted file]
src/convert.test.js [moved from src/__tests__/convert-test.js with 98% similarity]
src/multiplyDigits.test.js [moved from src/__tests__/multiplyDigits-test.js with 97% similarity]

diff --git a/.watchmanconfig b/.watchmanconfig
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/__mocks__/.eslintrc b/src/__mocks__/.eslintrc
deleted file mode 100644 (file)
index 1a863e8..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "env": {
-    "jasmine": true,
-    "node": true
-  },
-  "globals": {
-    "sinon": false
-  }
-}
diff --git a/src/__mocks__/sinon.js b/src/__mocks__/sinon.js
deleted file mode 100644 (file)
index 5e3f4bc..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Copyright 2003-present Greg Hurrell. All rights reserved.
- * Licensed under the terms of the MIT license.
- */
-
-'use strict';
-
-import sinon from 'sinon';
-
-let sandbox;
-
-beforeEach(function() {
-  sandbox = sinon.sandbox.create();
-});
-
-afterEach(function() {
-  sandbox.restore();
-});
-
-global.sinon = {
-  stub() {
-    sandbox.stub(...arguments);
-  },
-};
diff --git a/src/__tests__/.eslintrc b/src/__tests__/.eslintrc
deleted file mode 100644 (file)
index 1a863e8..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "env": {
-    "jasmine": true,
-    "node": true
-  },
-  "globals": {
-    "sinon": false
-  }
-}
similarity index 98%
rename from src/__tests__/convert-test.js
rename to src/convert.test.js
index c975864b3501d096940c46be268a1f86daa26fb6..1fce531253bb7cf2761641c1f73c3d8b35384139 100644 (file)
@@ -5,7 +5,7 @@
 
 'use strict';
 
 
 'use strict';
 
-import convert from '../convert';
+import convert from './convert';
 
 describe('convert()', () => {
   describe('converting from binary', () => {
 
 describe('convert()', () => {
   describe('converting from binary', () => {
similarity index 97%
rename from src/__tests__/multiplyDigits-test.js
rename to src/multiplyDigits.test.js
index 1c58b202c6ba6a111ed8d95a7bfe42773b7baba5..1e43f14018aa18c19e1e2f9cddcf79044b93041e 100644 (file)
@@ -5,7 +5,7 @@
 
 'use strict';
 
 
 'use strict';
 
-import multiplyDigits from '../multiplyDigits';
+import multiplyDigits from './multiplyDigits';
 
 describe('multiplyDigits()', () => {
   it('multiplies by 0', () => {
 
 describe('multiplyDigits()', () => {
   it('multiplies by 0', () => {