Skip to content

Commit

Permalink
docs: new version (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
stoffeastrom committed Mar 14, 2019
1 parent 2619c6c commit d010bf9
Show file tree
Hide file tree
Showing 22 changed files with 1,950 additions and 1 deletion.
344 changes: 344 additions & 0 deletions website/versioned_docs/version-6.0.0/cdp-options.md

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions website/versioned_docs/version-6.0.0/cdp.md
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 website/versioned_docs/version-6.0.0/chrome-esm-examples.md
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 website/versioned_docs/version-6.0.0/chrome-js-examples.md
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 website/versioned_docs/version-6.0.0/chrome-ts-examples.md
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)**

29 changes: 29 additions & 0 deletions website/versioned_docs/version-6.0.0/installation.md
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
```
25 changes: 25 additions & 0 deletions website/versioned_docs/version-6.0.0/node-js-examples.md
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 website/versioned_docs/version-6.0.0/node-js-no-babel-examples.md
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)**

Loading

0 comments on commit d010bf9

Please sign in to comment.