Skip to content

Commit 8af0295

Browse files
committed
fixup! merge repair
1 parent 6b1afc4 commit 8af0295

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

packages/pass-style/test/passStyleOf.test.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,16 @@ test('some passStyleOf rejections', t => {
9292
prbad2.extra = 'unexpected own property';
9393
harden(prbad2);
9494
t.throws(() => passStyleOf(prbad2), {
95-
message: /\[Promise\]" - Must not have any own properties: \["extra"\]/,
95+
message:
96+
/\[Promise\]" - Must not have any string-named own properties: \["extra"\]/,
9697
});
9798

9899
const prbad3 = Promise.resolve();
99100
Object.defineProperty(prbad3, 'then', { value: () => 'bad then' });
100101
harden(prbad3);
101102
t.throws(() => passStyleOf(prbad3), {
102-
message: /\[Promise\]" - Must not have any own properties: \["then"\]/,
103+
message:
104+
/\[Promise\]" - Must not have any string-named own properties: \["then"\]/,
103105
});
104106

105107
const thenable1 = harden({ then: () => 'thenable' });

packages/pass-style/test/safe-promise.test.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ test('safe promise loophole', t => {
1818
const p2 = Promise.resolve('p2');
1919
p2.silly = 'silly own property';
2020
t.throws(() => passStyleOf(harden(p2)), {
21-
message: '"[Promise]" - Must not have any own properties: ["silly"]',
21+
message:
22+
'"[Promise]" - Must not have any string-named own properties: ["silly"]',
2223
});
2324
t.is(p2[toStringTag], 'Promise');
2425
t.is(`${p2}`, '[object Promise]');
@@ -39,9 +40,7 @@ test('safe promise loophole', t => {
3940
defineProperty(p3, toStringTag, {
4041
value: 3,
4142
});
42-
t.throws(() => passStyleOf(harden(p3)), {
43-
message: 'Own @@toStringTag value must be a string: 3',
44-
});
43+
t.is(passStyleOf(harden(p3)), 'promise');
4544
}
4645

4746
{
@@ -50,10 +49,7 @@ test('safe promise loophole', t => {
5049
value: 'Promise p4',
5150
enumerable: true,
5251
});
53-
t.throws(() => passStyleOf(harden(p4)), {
54-
message:
55-
'Own @@toStringTag must not be enumerable: {"configurable":false,"enumerable":true,"value":"Promise p4","writable":false}',
56-
});
52+
t.is(passStyleOf(harden(p4)), 'promise');
5753

5854
const p5 = Promise.resolve('p5');
5955
defineProperty(p5, toStringTag, {

0 commit comments

Comments
 (0)