Forráskód Böngészése

remove unncessary inline loader

Evan You 9 éve
szülő
commit
dd38ee0a8a
2 módosított fájl, 2 hozzáadás és 2 törlés
  1. 1 1
      docs/en/testing.md
  2. 1 1
      docs/zh-cn/testing.md

+ 1 - 1
docs/en/testing.md

@@ -49,7 +49,7 @@ export const getAllProducts = ({ dispatch }) => {
 // with inject-loader, this returns a module factory
 // that allows us to inject mocked dependencies.
 import { expect } from 'chai'
-const actionsInjector = require('inject!babel!./actions')
+const actionsInjector = require('inject!./actions')
 
 // create the module with our mocks
 const actions = actionsInjector({

+ 1 - 1
docs/zh-cn/testing.md

@@ -48,7 +48,7 @@ import { expect } from 'chai'
 // 这里因为需要用 webpack loader 所以使用 require() 而不是 import
 // inject-loader 会返回一个工厂函数。这个工厂函数让我们可以对该模块的
 // 依赖进行 mock
-const actionsInjector = require('inject!babel!./actions')
+const actionsInjector = require('inject!./actions')
 
 // 调用工厂函数,获得 mock 过依赖的 actions 模块
 const actions = actionsInjector({