Skip to content

docs(cn): translate src/content/loaders/mocha-loader.md #966

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/content/loaders/mocha-loader.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ repo: https://github.com/webpack-contrib/mocha-loader



Allows [Mocha](https://mochajs.org/) tests to be loaded and run via webpack.
允许 [Mocha](https://mochajs.org/) 通过 webpack 加载并运行。

## Getting Started {#getting-started}
## 快速开始 {#getting-started}

To begin, you'll need to install `mocha-loader` and `mocha`:
首先,你需要先安装 `mocha-loader` `mocha`

```console
npm install --save-dev mocha-loader mocha
```

Then add the plugin to your `webpack` config. For example:
然后将该 loader 添加到 `webpack` 的配置中去,例如:

**file.js**

Expand Down Expand Up @@ -55,19 +55,19 @@ module.exports = {
};
```

And run `webpack` via your preferred method.
接着使用你习惯的方式运行 `webpack`

Alternative usage (without configuration):
另一种使用方法(无需配置):

```js
import test from 'mocha-loader!./test.js';
```

No options for loader.
loader 选项。

## Examples {#examples}
## 示例 {#examples}

### Basic {#basic}
### 基础 {#basic}

**file.js**

Expand Down Expand Up @@ -97,9 +97,9 @@ describe('Test', () => {
});
```

## Contributing {#contributing}
## 贡献 {#contributing}

Please take a moment to read our contributing guidelines if you haven't yet done so.
如果你还没有看过我们的贡献者指南请先花点时间看一下。

[CONTRIBUTING](https://github.com/webpack-contrib/mocha-loader/blob/master/.github/CONTRIBUTING.md)

Expand Down