Skip to content

Commit

Permalink
improve readme (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Feb 28, 2023
1 parent e00748a commit 76b767e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,33 @@ describe('generator test', () => {
});
```
Generator compose:
```js
import assert from 'assert';
import helpers, { result } from 'yeoman-test';

describe('my-gen', () => {
before(() => helpers.run('my-gen').withMockedGenerator(['composed-gen']));
it('should compose with composed-gen', () => {
assert(result.mockedGenerators['composed-gen'].calledOnce);
});
});
```
Generic test folder:
```js
import helpers, { result } from 'yeoman-test';

describe('generic test', () => {
before(() => helpers.prepareTemporaryDir());
it('test', () => {
result.assert...;
});
});
```
[See our api documentation](https://yeoman.github.io/yeoman-test) for latest yeoman-test release.
[See our api documentation](https://yeoman.github.io/yeoman-test/5.0.1) for yeoman-test 5.0.1. Use 5.x for yeoman-environment 2.x support.
Expand Down

0 comments on commit 76b767e

Please sign in to comment.