Skip to content

Commit 50f969e

Browse files
committed
prettier --write '**/*.{js,md}'
1 parent c8a0f67 commit 50f969e

29 files changed

+343
-335
lines changed

documentation/assertions/DOMElement/queried-for-test-id.md

+3-8
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ var element = createElement(`
1717
`);
1818

1919
expect(element, 'queried for test id', 'numbers', 'to satisfy', {
20-
children: expect.it('to have length', 3)
20+
children: expect.it('to have length', 3),
2121
});
2222
```
2323

2424
If no matching element can be found you get the following error:
2525

2626
```js
2727
expect(element, 'queried for test id', 'emojies', 'to satisfy', {
28-
children: expect.it('to have length', 666)
28+
children: expect.it('to have length', 666),
2929
});
3030
```
3131

@@ -48,12 +48,7 @@ queried for test id 'emojies' to satisfy { children: expect.it('to have length',
4848
In case the next assertion fails you will get an error looking like this:
4949

5050
```js
51-
expect(
52-
element,
53-
'queried for test id',
54-
'numbers',
55-
'to have no children'
56-
);
51+
expect(element, 'queried for test id', 'numbers', 'to have no children');
5752
```
5853

5954
```output

documentation/assertions/DOMElement/queried-for.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var element = createElement(`
1818
expect(element, 'queried for', '[data-test-id=numbers] > li', 'to satisfy', [
1919
'<li>One</li>',
2020
'<li>Two</li>',
21-
'<li>Three</li>'
21+
'<li>Three</li>',
2222
]);
2323

2424
expect(element, 'queried for first', 'hr', 'to have no children');
@@ -28,15 +28,15 @@ If you use the `first` flag, the first maching element will be forwarded to the
2828

2929
```js
3030
expect(element, 'queried for first', '[data-test-id=numbers]', 'to satisfy', {
31-
children: expect.it('to have length', 3)
31+
children: expect.it('to have length', 3),
3232
});
3333
```
3434

3535
If no matching element can be found you get the following error:
3636

3737
```js
3838
expect(element, 'queried for first', '[data-test-id=emojies]', 'to satisfy', {
39-
children: expect.it('to have length', 666)
39+
children: expect.it('to have length', 666),
4040
});
4141
```
4242

documentation/assertions/DOMElement/to-contain.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ expect(element, 'to contain', {
3838
{
3939
name: 'a',
4040
attributes: {
41-
href: 'https://example.com/learn'
41+
href: 'https://example.com/learn',
4242
},
43-
children: ['here']
43+
children: ['here'],
4444
},
45-
'.'
46-
]
45+
'.',
46+
],
4747
});
4848
```
4949

@@ -85,5 +85,9 @@ You can also assert that the element has no descendant elements satisfying the
8585
given specification:
8686

8787
```js
88-
expect(element, 'not to contain', '<h1 class="heading">Assert on all content</h1>');
88+
expect(
89+
element,
90+
'not to contain',
91+
'<h1 class="heading">Assert on all content</h1>'
92+
);
8993
```

documentation/assertions/DOMElement/to-have-attributes.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ means you only need to mention the tree expected of data you want to assert:
4747
expect(element, 'to have attributes', {
4848
class: ['info'],
4949
style: {
50-
border: 'thin solid gray'
50+
border: 'thin solid gray',
5151
},
52-
id: /stock/
52+
id: /stock/,
5353
});
5454
```
5555

@@ -59,9 +59,9 @@ In case of a failing expectation you get the following output:
5959
expect(element, 'to have attributes', {
6060
class: ['warning'],
6161
style: {
62-
border: 'thick solid gray'
62+
border: 'thick solid gray',
6363
},
64-
id: expect.it('to be a string')
64+
id: expect.it('to be a string'),
6565
});
6666
```
6767

documentation/assertions/DOMElement/to-satisfy.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ expect(element, 'queried for first', '[data-test-id=learn]', 'to satisfy', {
4949
{
5050
name: 'a',
5151
attributes: {
52-
href: 'https://example.com/learn'
52+
href: 'https://example.com/learn',
5353
},
54-
children: ['here']
54+
children: ['here'],
5555
},
56-
'.'
57-
]
56+
'.',
57+
],
5858
});
5959
```
6060

documentation/assertions/DOMNodeList/to-satisfy.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var element = createElement(`
1818
expect(element, 'queried for', '[data-test-id=numbers] > li', 'to satisfy', [
1919
'<li>One</li>',
2020
{ children: [/Two/] },
21-
expect.it('to have text', 'Three')
21+
expect.it('to have text', 'Three'),
2222
]);
2323

2424
expect(
@@ -27,7 +27,7 @@ expect(
2727
'[data-test-id=numbers] > *',
2828
'to have items satisfying',
2929
{
30-
name: 'li'
30+
name: 'li',
3131
}
3232
);
3333
```
@@ -38,7 +38,7 @@ In case of a failing expectation you get the following output:
3838
expect(element, 'queried for', '[data-test-id=numbers] > li', 'to satisfy', [
3939
'<li>Three</li>',
4040
'<li>Two</li>',
41-
'<li>One</li>'
41+
'<li>One</li>',
4242
]);
4343
```
4444

@@ -83,7 +83,7 @@ expect(
8383
[
8484
'<li class="number">One</li>',
8585
'<li class="number">Two</li>',
86-
'<li>Three</li>'
86+
'<li>Three</li>',
8787
]
8888
);
8989
```

documentation/assertions/string/parsed-as-HTML.md

+12-8
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,24 @@ Parses a string as a HTML document using the facilities available in the browser
22

33
```js
44
expect(
5-
'<html><body><div class="foo"></div></body></html>',
6-
'when parsed as HTML',
7-
'queried for first', 'div',
8-
'to have attributes', { class: 'foo' }
5+
'<html><body><div class="foo"></div></body></html>',
6+
'when parsed as HTML',
7+
'queried for first',
8+
'div',
9+
'to have attributes',
10+
{ class: 'foo' }
911
);
1012
```
1113

1214
You can also parse a HTML fragment:
1315

1416
```js
1517
expect(
16-
'<div class="foo"></div>',
17-
'when parsed as HTML fragment',
18-
'queried for first', 'div',
19-
'to have attributes', { class: 'foo' }
18+
'<div class="foo"></div>',
19+
'when parsed as HTML fragment',
20+
'queried for first',
21+
'div',
22+
'to have attributes',
23+
{ class: 'foo' }
2024
);
2125
```

documentation/assertions/string/parsed-as-XML.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@ Parses a string as an XML document using the facilities available in the browser
22

33
```js
44
expect(
5-
`<?xml version="1.0"?>
5+
`<?xml version="1.0"?>
66
<content>
77
<hello type="greeting">World</hello>
88
</content>
99
`,
10-
'when parsed as XML',
11-
'queried for first', 'hello',
12-
'to satisfy', {
13-
attributes: {
14-
type: 'greeting'
15-
},
16-
children: ['World']
17-
}
10+
'when parsed as XML',
11+
'queried for first',
12+
'hello',
13+
'to satisfy',
14+
{
15+
attributes: {
16+
type: 'greeting',
17+
},
18+
children: ['World'],
19+
}
1820
);
1921
```

documentation/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('in a document', () => {
4444
it('should find a DOM node', () => {
4545
expect(document.body, 'to have attributes', {
4646
id: 'app',
47-
lang: 'en-US'
47+
lang: 'en-US',
4848
});
4949
});
5050
});

karma.conf.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = function(config) {
1+
module.exports = function (config) {
22
config.set({
33
frameworks: ['mocha'],
44

@@ -7,14 +7,14 @@ module.exports = function(config) {
77
'./node_modules/unexpected-snapshot/unexpected-snapshot-browser.js',
88
'./unexpected-dom.js',
99
'./test/common/browser.js',
10-
'./build/tests.js'
10+
'./build/tests.js',
1111
],
1212

1313
client: {
1414
mocha: {
1515
reporter: 'html',
16-
timeout: 60000
17-
}
16+
timeout: 60000,
17+
},
1818
},
1919

2020
browserStack: {
@@ -23,7 +23,7 @@ module.exports = function(config) {
2323
process.env.TRAVIS_BRANCH === 'master' &&
2424
!process.env.TRAVIS_PULL_REQUEST_BRANCH // Catch Travis "PR" builds
2525
? 'unexpected-dom'
26-
: 'unexpected-dom-dev'
26+
: 'unexpected-dom-dev',
2727
},
2828

2929
browsers: ['ChromeHeadless', 'ie11'],
@@ -34,10 +34,10 @@ module.exports = function(config) {
3434
browser: 'IE',
3535
browser_version: '11',
3636
os: 'Windows',
37-
os_version: '7'
38-
}
37+
os_version: '7',
38+
},
3939
},
4040

41-
reporters: ['dots', 'BrowserStack']
41+
reporters: ['dots', 'BrowserStack'],
4242
});
4343
};

rollup.config.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var plugins = [
44
require('rollup-plugin-json')(),
55
require('rollup-plugin-commonjs')(),
66
require('rollup-plugin-node-resolve')(),
7-
require('rollup-plugin-node-globals')()
7+
require('rollup-plugin-node-globals')(),
88
];
99

1010
module.exports = [
@@ -16,9 +16,9 @@ module.exports = [
1616
exports: 'named',
1717
format: 'umd',
1818
sourcemap: false,
19-
strict: false
19+
strict: false,
2020
},
21-
plugins
21+
plugins,
2222
},
2323
{
2424
input: 'lib/index.js',
@@ -28,8 +28,8 @@ module.exports = [
2828
exports: 'named',
2929
format: 'umd',
3030
sourcemap: false,
31-
strict: false
31+
strict: false,
3232
},
33-
plugins: plugins.concat([terser()])
34-
}
33+
plugins: plugins.concat([terser()]),
34+
},
3535
];

rollup.tests.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
input: 'build/test/**/*.spec.js',
33
output: {
4-
strict: false
4+
strict: false,
55
},
6-
plugins: require('@rollup/plugin-multi-entry')({ exports: false })
6+
plugins: require('@rollup/plugin-multi-entry')({ exports: false }),
77
};

0 commit comments

Comments
 (0)