Skip to content

Commit 171b93c

Browse files
committed
Merge pull request #509 from unexpectedjs/v11
V11 (Major)
2 parents 1d223cd + efa0ea2 commit 171b93c

File tree

81 files changed

+1675
-1189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1675
-1189
lines changed

.travis.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,26 @@ env:
44
- TARGET=travis
55

66
node_js:
7-
- "0.10"
8-
- "0.12"
9-
- "4"
10-
- "5"
117
- "6"
128
- "7"
9+
- "8.4.0"
1310
- "9"
1411
- "10"
1512

1613
matrix:
1714
include:
18-
- name: Travis main 8.4.0
15+
- name: Lint (8.4.0)
1916
node_js: "8.4.0"
20-
env: TARGET=travis-main
17+
env: TARGET=lint
18+
- name: Jest (8.4.0)
19+
node_js: "8.4.0"
20+
env: TARGET=test-jest
21+
- name: Jasmine (8.4.0)
22+
node_js: "8.4.0"
23+
env: TARGET=test-jasmine
24+
- name: Coverage (8.4.0)
25+
node_js: "8.4.0"
26+
env: TARGET=travis-coverage
2127
- name: BrowserStack IE11
2228
node_js: "8.4.0"
2329
env: TARGET=test-browserstack-ie11

Makefile

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
REPORTER = dot
22

33
TARGETS ?= unexpected.js unexpected.js.map
4+
.PHONY: unexpected.js
5+
.SECONDARY: unexpected.js.map
46

57
CHEWBACCA_THRESHOLD ?= 25
68

@@ -25,7 +27,6 @@ build/externaltests: externaltests/*
2527

2628
build: build/lib build/test build/externaltests
2729

28-
.PHONY: ${TARGETS}
2930
${TARGETS}: build
3031
./node_modules/.bin/rollup --config rollup.config.js --sourcemap --format umd --name weknowhow.expect -o unexpected.js build/lib/index.js
3132

@@ -50,15 +51,12 @@ test-jest:
5051
ifeq ($(MODERN_NODE), true)
5152
./node_modules/.bin/jest
5253
else
53-
./node_modules/.bin/jest -c test/jest.es5.config.json
54+
./node_modules/.bin/jest --rootDir . -c test/jest.es5.config.json
5455
endif
5556

56-
test-jest-if-supported-node-version:
57-
@node-version-gte-6 && make test-jest || echo Skipping, jest is unsupported with node $(shell node --version)
58-
5957
.PHONY: test
6058
test: test-sources
61-
@./node_modules/.bin/mocha --opts $(MOCHA_OPTS) $(TEST_SOURCES) $(TEST_SOURCE_MARKDOWN)
59+
@./node_modules/.bin/mocha --opts $(MOCHA_OPTS) $(TEST_SOURCES) $(TEST_SOURCES_MARKDOWN)
6260

6361
nyc-includes:
6462
ifeq ($(MODERN_NODE), true)
@@ -84,12 +82,12 @@ test-chrome-headless: ${TARGETS}
8482
test-browserstack-%: ${TARGETS}
8583
@./node_modules/.bin/karma start --browsers=$* --single-run
8684

87-
.PHONY: travis-main
88-
travis-main: clean lint test test-jasmine test-jest coverage
85+
.PHONY: travis-coverage
86+
travis-coverage: clean coverage
8987
-<coverage/lcov.info ./node_modules/coveralls/bin/coveralls.js
9088

9189
.PHONY: travis
92-
travis: test test-jest-if-supported-node-version
90+
travis: test
9391

9492
.PHONY: git-dirty-check
9593
git-dirty-check:
@@ -117,7 +115,7 @@ changelog: git-dirty-check
117115
fi
118116

119117
.PHONY: release-%
120-
release-%: git-dirty-check lint ${TARGETS} test-chrome-headless test-jasmine test-jest-if-supported-node-version commit-unexpected deploy-site
118+
release-%: git-dirty-check lint ${TARGETS} test-chrome-headless test-jasmine test-jest commit-unexpected
121119
IS_MAKE_RELEASE=yes npm version $*
122120
make changelog
123121
@echo $* release ready to be publised to NPM

documentation/api/addType.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -299,32 +299,32 @@ block. The outputs below shows the contrast between setting the
299299
inlineDiff = true;
300300
expect(
301301
{
302-
'John Doe': new Person('John Doe', 42),
303-
'Jane Doe': new Person('Janie Doe', 24)
302+
JohnDoe: new Person('John Doe', 42),
303+
JaneDoe: new Person('Janie Doe', 24)
304304
},
305305
'to equal',
306306
{
307-
'John Doe': new Person('John Doe', 42),
308-
'Jane Doe': new Person('Jane Doe', 24)
307+
JohnDoe: new Person('John Doe', 42),
308+
JaneDoe: new Person('Jane Doe', 24)
309309
}
310310
);
311311
```
312312

313313
```output
314314
expected
315315
{
316-
'John Doe': new Person('John Doe', 42),
317-
'Jane Doe': new Person('Janie Doe', 24)
316+
JohnDoe: new Person('John Doe', 42),
317+
JaneDoe: new Person('Janie Doe', 24)
318318
}
319319
to equal
320320
{
321-
'John Doe': new Person('John Doe', 42),
322-
'Jane Doe': new Person('Jane Doe', 24)
321+
JohnDoe: new Person('John Doe', 42),
322+
JaneDoe: new Person('Jane Doe', 24)
323323
}
324324
325325
{
326-
'John Doe': new Person('John Doe', 42),
327-
'Jane Doe': new Person(
326+
JohnDoe: new Person('John Doe', 42),
327+
JaneDoe: new Person(
328328
'Janie Doe', // should be 'Jane Doe'
329329
// -Janie Doe
330330
// +Jane Doe
@@ -337,39 +337,39 @@ to equal
337337
inlineDiff = false;
338338
expect(
339339
{
340-
'John Doe': new Person('John Doe', 42),
341-
'Jane Doe': new Person('Janie Doe', 24)
340+
JohnDoe: new Person('John Doe', 42),
341+
JaneDoe: new Person('Janie Doe', 24)
342342
},
343343
'to equal',
344344
{
345-
'John Doe': new Person('John Doe', 42),
346-
'Jane Doe': new Person('Jane Doe', 24)
345+
JohnDoe: new Person('John Doe', 42),
346+
JaneDoe: new Person('Jane Doe', 24)
347347
}
348348
);
349349
```
350350

351351
```output
352352
expected
353353
{
354-
'John Doe': new Person('John Doe', 42),
355-
'Jane Doe': new Person('Janie Doe', 24)
354+
JohnDoe: new Person('John Doe', 42),
355+
JaneDoe: new Person('Janie Doe', 24)
356356
}
357357
to equal
358358
{
359-
'John Doe': new Person('John Doe', 42),
360-
'Jane Doe': new Person('Jane Doe', 24)
359+
JohnDoe: new Person('John Doe', 42),
360+
JaneDoe: new Person('Jane Doe', 24)
361361
}
362362
363363
{
364-
'John Doe': new Person('John Doe', 42),
365-
'Jane Doe': new Person('Janie Doe', 24) // should equal new Person('Jane Doe', 24)
366-
//
367-
// new Person(
368-
// 'Janie Doe', // should be 'Jane Doe'
369-
// // -Janie Doe
370-
// // +Jane Doe
371-
// 24
372-
// )
364+
JohnDoe: new Person('John Doe', 42),
365+
JaneDoe: new Person('Janie Doe', 24) // should equal new Person('Jane Doe', 24)
366+
//
367+
// new Person(
368+
// 'Janie Doe', // should be 'Jane Doe'
369+
// // -Janie Doe
370+
// // +Jane Doe
371+
// 24
372+
// )
373373
}
374374
```
375375

documentation/api/async.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

documentation/api/fail.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,5 @@ If you are using the default error mode, you don't have to specify the
9999
error message as it is just thrown away.
100100

101101
The diff is a method that will create a custom diff lazily. To get a
102-
better understanding of the diff method see the [type](/api/addType)
102+
better understanding of the diff method see the [type](../addType/)
103103
documentation.

documentation/api/promise-all.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fulfilled. If any of the promises is rejected, the resulting promise will be
1010
rejected with the same error.
1111

1212
This method is usually used in combination with
13-
[expect.promise.settle](/api/promise-settle).
13+
[expect.promise.settle](../promise-settle/).
1414

1515
Let's make an asynchronous assertion that we can use for the examples:
1616

@@ -30,7 +30,7 @@ expect.addAssertion('to be a number after a short delay', function(
3030
});
3131
```
3232

33-
See the [promise](/api/promise) documentation for more details on how
33+
See the [promise](../promise/) documentation for more details on how
3434
expect.promise works.
3535

3636
The following code snippet creates a promise that is fulfilled when all the

documentation/api/promise-any.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ expect.addAssertion('to be a number after a short delay', function(
2727
});
2828
```
2929

30-
See the [promise](/api/promise) documentation for more details on how
30+
See the [promise](../promise/) documentation for more details on how
3131
expect.promise works.
3232

3333
The following code snippet creates a promise that will be fulfilled when any

documentation/api/promise-settle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ expect.addAssertion('to be a number after a short delay', function(
2828
});
2929
```
3030

31-
See the [promise](/api/promise) documentation for more details on how
31+
See the [promise](../promise/) documentation for more details on how
3232
expect.promise works.
3333

3434
The following code snippet creates a promise that is rejected when any

documentation/api/promise.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# expect.promise(promiseBody)
22

3-
This method is used inside [addAssertion](/api/addAssertion) to create
3+
This method is used inside [addAssertion](../addAssertion/) to create
44
a promise from the given body function.
55

66
Signature:

documentation/api/use.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ to extend the instance.
3737
expect.use(require('unexpected-sinon'));
3838
```
3939

40-
Notice that it is usually a good idea to [clone](../clone) the instance before
40+
Notice that it is usually a good idea to [clone](../clone/) the instance before
4141
extending it with plugins.
4242

4343
## Example
@@ -101,4 +101,4 @@ expected [7,13] to contain 27
101101
```
102102

103103
For more inspiration you can look at the source for existing plugins.
104-
See [the plugin page](/plugins/) for a list.
104+
See [the plugin page](../../plugins/) for a list.

0 commit comments

Comments
 (0)