Skip to content

Commit 968768a

Browse files
committed
Run prettier
1 parent d6f2105 commit 968768a

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"test:unit": "karma start",
1111
"test:types": "tsc -t esnext -m esnext --lib esnext,dom --moduleResolution node --noEmit tests/type-checks.ts",
1212
"test": "npm run fmt_test && npm run build && npm run test:types && npm run test:unit",
13-
"fmt": "prettier --write ./*.{mjs,js,ts,md,json,html} ./{src,docs,tests}/**/*.{mjs,js,ts,md,json,html}",
14-
"fmt_test": "test $(prettier -l ./*.{mjs,js,ts,md,json,html} ./{src,docs,tests}/**/*.{mjs,js,ts,md,json,html} | wc -l) -eq 0",
13+
"fmt": "prettier --write ./*.{mjs,js,ts,md,json,html} ./{src,docs,tests}/{,**/}*.{mjs,js,ts,md,json,html}",
14+
"fmt_test": "test $(prettier -l ./*.{mjs,js,ts,md,json,html} ./{src,docs,tests}/{**/,}*.{mjs,js,ts,md,json,html} | wc -l) -eq 0",
1515
"watchtest": "CHROME_ONLY=1 karma start --no-single-run"
1616
},
1717
"husky": {

tests/same_window.comlink.test.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,14 @@ describe("Comlink in the same realm", function() {
118118

119119
it("can forward an async function error", async function() {
120120
const thing = Comlink.wrap(this.port1);
121-
Comlink.expose({
122-
async throwError() {
123-
throw new Error("Should have thrown");
124-
}
125-
}, this.port2);
121+
Comlink.expose(
122+
{
123+
async throwError() {
124+
throw new Error("Should have thrown");
125+
}
126+
},
127+
this.port2
128+
);
126129
try {
127130
await thing.throwError();
128131
} catch (err) {
@@ -316,7 +319,7 @@ describe("Comlink in the same realm", function() {
316319
const receive = await thing(array);
317320
expect(array).to.not.equal(receive);
318321
expect(array.byteLength).to.equal(receive.byteLength);
319-
expect([...array]).to.deep.equal([...receive])
322+
expect([...array]).to.deep.equal([...receive]);
320323
});
321324

322325
guardedIt(isNotSafari11_1)("will copy nested TypedArrays", async function() {
@@ -329,7 +332,7 @@ describe("Comlink in the same realm", function() {
329332
});
330333
expect(array).to.not.equal(receive.array);
331334
expect(array.byteLength).to.equal(receive.array.byteLength);
332-
expect([...array]).to.deep.equal([...receive.array])
335+
expect([...array]).to.deep.equal([...receive.array]);
333336
});
334337

335338
guardedIt(isNotSafari11_1)(
@@ -542,7 +545,7 @@ describe("Comlink in the same realm", function() {
542545
expect(() => instance.method()).to.throw();
543546
});
544547

545-
it('can proxy with a given target', async function() {
548+
it("can proxy with a given target", async function() {
546549
const thing = Comlink.wrap(this.port1, { value: {} });
547550
Comlink.expose({ value: 4 }, this.port2);
548551
expect(await thing.value).to.equal(4);

0 commit comments

Comments
 (0)