Quellcode durchsuchen

use es6 imports in tests

mightyplow vor 7 Jahren
Ursprung
Commit
1b409bf2e7
2 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  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');
 
     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.done();
 };