Skip to content

Commit

Permalink
chore(version): 14.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitchal committed Mar 2, 2018
1 parent c67f2d1 commit 60b2e6b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "acast-test-helpers",
"version": "13.1.0",
"version": "14.0.0",
"description": "A bunch of helper methods that greatly simplify asynchronous unit and acceptance testing of front end web apps.",
"main": "dist/index.js",
"scripts": {
Expand Down
8 changes: 6 additions & 2 deletions src/acceptance.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,9 @@ export function fillIn(selector, value) {
);

if (!inputClass) {
throw new Error(`acast-test-helpers#fillIn(): Selector '${selector}' matched invalid type. fillIn() can only be used on elements of type 'input', 'select' or 'textarea'!`);
throw new Error(
`acast-test-helpers#fillIn(): Selector '${selector}' matched invalid type. fillIn() can only be used on elements of type 'input', 'select' or 'textarea'!`
);
}

const originalValueSetter = Object.getOwnPropertyDescriptor(
Expand All @@ -307,7 +309,9 @@ export function fillIn(selector, value) {
originalValueSetter.call(target, value);

if (value && target.value !== value.toString()) {
throw new Error(`acast-test-helpers#fillIn(): Failed to set value '${value}' on element matched by selector '${selector}'! If it's a <select>, make sure the filled in value is one of the options.`);
throw new Error(
`acast-test-helpers#fillIn(): Failed to set value '${value}' on element matched by selector '${selector}'! If it's a <select>, make sure the filled in value is one of the options.`
);
}

target.dispatchEvent(new Event('input', { bubbles: true }));
Expand Down
4 changes: 2 additions & 2 deletions src/xhr/stubber.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function FakeRequest() {
FakeXMLHttpRequest.call(this);
fakehr.addRequest(this);

this.respondWithJson = (statusCode=200, payload={}) => {
this.respondWithJson = (statusCode = 200, payload = {}) => {
if (typeof statusCode !== 'number') {
payload = statusCode;
statusCode = 200;
Expand All @@ -45,7 +45,7 @@ function FakeRequest() {
statusCode,
{ 'Content-Type': 'application/json' },
JSON.stringify(payload)
)
);
};

this.respondWithOctetStream = (statusCode, buffer) => {
Expand Down

0 comments on commit 60b2e6b

Please sign in to comment.