Browse Source

use es6 imports in tests

mightyplow 7 years ago
parent
commit
1b409bf2e7
2 changed files with 4 additions and 4 deletions
  1. 2 2
      src/function/__tests__/combine.test.js
  2. 2 2
      src/object/__tests__/filter.test.js

+ 2 - 2
src/function/__tests__/combine.test.js

@@ -1,6 +1,6 @@
-export default test => {
-    const combine = require('../index').combine;
+import combine from '../combine';
 
 
+export default test => {
     test.ok(typeof combine === 'function', 'combine should be a function');
     test.ok(typeof combine === 'function', 'combine should be a function');
 
 
     const a = val => val * 10;
     const a = val => val * 10;

+ 2 - 2
src/object/__tests__/filter.test.js

@@ -1,6 +1,6 @@
-export default test => {
-    const filter = require('../index').filter;
+import filter from '../filter';
 
 
+export default test => {
     test.ok(typeof filter === 'function', 'filter should be a function');
     test.ok(typeof filter === 'function', 'filter should be a function');
     test.done();
     test.done();
 };
 };