From f5075eb3be3b0ea310ff2ea712faf17ae3a460fd Mon Sep 17 00:00:00 2001 From: Sendil Kumar Date: Tue, 3 Jul 2018 20:48:31 +0200 Subject: [PATCH] use simplified logic --- tests/all/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/all/main.rs b/tests/all/main.rs index 2031ddf2..79100d24 100644 --- a/tests/all/main.rs +++ b/tests/all/main.rs @@ -51,7 +51,7 @@ fn project() -> Project { const fs = require('fs'); let nodeModules = {}; - + // Webpack bundles the modules from node_modules. // For node target, we will not have `fs` module // inside the `node_modules` folder. @@ -59,7 +59,7 @@ fn project() -> Project { // and give that to externals and webpack ignores // to bundle the modules listed as external. fs.readdirSync('node_modules') - .filter(module => ['.bin'].indexOf(module) === -1) + .filter(module => module !== '.bin') .forEach(mod => { // External however,expects browser environment. // To make it work in `node` target we