-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2619c6c
commit d010bf9
Showing
22 changed files
with
1,950 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
id: version-6.0.0-chrome | ||
title: Chrome | ||
original_id: chrome | ||
--- | ||
|
||
Run your test headless/headful in Chrome with great developer workflow. Just start the runner with | ||
|
||
``` | ||
npx aw chrome -c ./path/to/aw.config.js -w --coverage | ||
``` | ||
|
||
and start testing. It will only rerun affected tests and generate coverage accordingly. | ||
Add files, remove files as you go and change your tests to rapidly build up a test coverage. |
21 changes: 21 additions & 0 deletions
21
website/versioned_docs/version-6.0.0/chrome-esm-examples.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
id: version-6.0.0-chrome-esm-examples | ||
title: Chrome-esm | ||
original_id: chrome-esm-examples | ||
--- | ||
|
||
## Test | ||
|
||
```javascript | ||
// The .js is needed since that's what the browser will request and according to spec | ||
import getA from '../src/a.js'; // eslint-disable-line import/extensions | ||
|
||
describe('A', () => { | ||
it('should return "a"', () => { | ||
expect(getA()).to.equal('a'); | ||
}); | ||
}); | ||
``` | ||
|
||
**[examples/chrome-esm/test/a.spec.js](https://github.com/qlik-oss/after-work.js/tree/master/examples/chrome-esm/test/a.spec.js)** | ||
|
71 changes: 71 additions & 0 deletions
71
website/versioned_docs/version-6.0.0/chrome-js-examples.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
id: version-6.0.0-chrome-js-examples | ||
title: Chrome-js | ||
original_id: chrome-js-examples | ||
--- | ||
|
||
## Test | ||
|
||
```javascript | ||
import getA from '../src/a'; | ||
|
||
describe('chrome-js A', () => { | ||
it('should return "a"', () => { | ||
expect(getA()).to.equal('a'); | ||
}); | ||
}); | ||
``` | ||
|
||
**[examples/chrome-js/test/a.spec.js](https://github.com/qlik-oss/after-work.js/tree/master/examples/chrome-js/test/a.spec.js)** | ||
|
||
## Test | ||
|
||
```javascript | ||
import { expect } from 'chai'; | ||
import getB from '../src/b'; | ||
|
||
describe('chrome-js B', () => { | ||
it('should return "b"', () => { | ||
expect(getB()).to.equal('b'); | ||
}); | ||
}); | ||
``` | ||
|
||
**[examples/chrome-js/test/b.spec.js](https://github.com/qlik-oss/after-work.js/tree/master/examples/chrome-js/test/b.spec.js)** | ||
|
||
## Test | ||
|
||
```javascript | ||
import c from '../src/c'; | ||
|
||
describe('chrome-js C', () => { | ||
let sandbox; | ||
let foo; | ||
beforeEach(() => { | ||
sandbox = sinon.createSandbox(); | ||
foo = sandbox.spy(c, 'foo'); | ||
}); | ||
afterEach(() => sandbox.restore()); | ||
|
||
it('should be able to use sinon, sinon-chai', () => { | ||
c.foo(); | ||
expect(foo).to.have.been.calledOnce; | ||
}); | ||
it('should be able to use chai-subset', () => { | ||
const obj = { | ||
a: 'b', | ||
c: { | ||
foo: 'bar', | ||
}, | ||
}; | ||
expect(obj).to.containSubset({ | ||
c: { | ||
foo: 'bar', | ||
}, | ||
}); | ||
}); | ||
}); | ||
``` | ||
|
||
**[examples/chrome-js/test/c.spec.js](https://github.com/qlik-oss/after-work.js/tree/master/examples/chrome-js/test/c.spec.js)** | ||
|
36 changes: 36 additions & 0 deletions
36
website/versioned_docs/version-6.0.0/chrome-ts-examples.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
id: version-6.0.0-chrome-ts-examples | ||
title: Chrome-ts | ||
original_id: chrome-ts-examples | ||
--- | ||
|
||
## Test | ||
|
||
```javascript | ||
import { expect } from 'chai'; | ||
import getA from '../src/a'; | ||
|
||
describe('chrome-ts A', () => { | ||
it('should return "a"', () => { | ||
expect(getA()).to.equal('a'); | ||
}); | ||
}); | ||
``` | ||
|
||
**[examples/chrome-ts/test/a.spec.ts](https://github.com/qlik-oss/after-work.js/tree/master/examples/chrome-ts/test/a.spec.ts)** | ||
|
||
## Test | ||
|
||
```javascript | ||
import { expect } from 'chai'; | ||
import getB from '../src/b'; | ||
|
||
describe('chrome-ts B', () => { | ||
it('should return "b"', () => { | ||
expect(getB()).to.equal('b'); | ||
}); | ||
}); | ||
``` | ||
|
||
**[examples/chrome-ts/test/b.spec.ts](https://github.com/qlik-oss/after-work.js/tree/master/examples/chrome-ts/test/b.spec.ts)** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
id: version-6.0.0-installation | ||
title: Installation | ||
original_id: installation | ||
--- | ||
|
||
## Getting started | ||
|
||
Make sure you meet the [requirements](./requirements.md) | ||
|
||
Install all packages with: | ||
|
||
```sh | ||
npm i -D @after-work.js/aw | ||
``` | ||
|
||
Now you have a couple of sub commands available | ||
|
||
```sh | ||
npx aw -h | ||
``` | ||
|
||
## Custom | ||
|
||
If you only need the node runner: | ||
|
||
```sh | ||
npm i -D @after-work.js/node-cli | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
id: version-6.0.0-node-js-examples | ||
title: Node-js | ||
original_id: node-js-examples | ||
--- | ||
|
||
## Test | ||
|
||
```javascript | ||
import virtual from './foobar-virtual.html'; | ||
import template from './foobar.html'; | ||
|
||
describe('html', () => { | ||
it('should import virtual template', () => { | ||
expect(virtual).toMatchSnapshot(); | ||
}); | ||
|
||
it('should import template', () => { | ||
expect(template).toMatchSnapshot(); | ||
}); | ||
}); | ||
``` | ||
|
||
**[examples/node-js/test/html.spec.js](https://github.com/qlik-oss/after-work.js/tree/master/examples/node-js/test/html.spec.js)** | ||
|
20 changes: 20 additions & 0 deletions
20
website/versioned_docs/version-6.0.0/node-js-no-babel-examples.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
id: version-6.0.0-node-js-no-babel-examples | ||
title: Node-js-no-babel | ||
original_id: node-js-no-babel-examples | ||
--- | ||
|
||
## Test | ||
|
||
```javascript | ||
const getAzure = require('../src/'); | ||
|
||
describe('Azure', () => { | ||
it('should work', () => { | ||
expect(getAzure()).to.equal('azure'); | ||
}); | ||
}); | ||
``` | ||
|
||
**[examples/node-js-no-babel/test/index.spec.js](https://github.com/qlik-oss/after-work.js/tree/master/examples/node-js-no-babel/test/index.spec.js)** | ||
|
Oops, something went wrong.