From f275fc8069ab2cfb9f0d824674bd274ca3050638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Mon, 14 May 2018 09:21:40 +0200 Subject: [PATCH] Update transpile to return the opposite of exclude --- test/unit/basic.dev.test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/unit/basic.dev.test.js b/test/unit/basic.dev.test.js index cb251b949d..090d077d35 100644 --- a/test/unit/basic.dev.test.js +++ b/test/unit/basic.dev.test.js @@ -21,7 +21,7 @@ describe('basic dev', () => { extend({ module: { rules } }, { isClient }) { if (isClient) { const babelLoader = rules.find(loader => loader.test.test('.jsx')) - transpile = babelLoader.exclude + transpile = (file) => !babelLoader.exclude(file) } } } @@ -34,10 +34,10 @@ describe('basic dev', () => { test('Config: build.transpile', async () => { expect(transpile('vue-test')).toBeUndefined() - expect(transpile('node_modules/test.js')).toBe(true) - expect(transpile('node_modules/vue-test')).toBe(false) - expect(transpile('node_modules/vue.test.js')).toBe(false) - expect(transpile('node_modules/test.vue.js')).toBe(false) + expect(transpile('node_modules/test.js')).toBe(false) + expect(transpile('node_modules/vue-test')).toBe(true) + expect(transpile('node_modules/vue.test.js')).toBe(true) + expect(transpile('node_modules/test.vue.js')).toBe(true) }) test('/stateless', async () => {