Skip to content

Commit 9017c62

Browse files
committed
Add full even test for reserved terms.
1 parent 4a20b6f commit 9017c62

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

tests/misc.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,6 +1701,43 @@ describe('events', () => {
17011701
testNotStrict: true
17021702
});
17031703
});
1704+
1705+
it('should be called on invalid reserved term', async () => {
1706+
const input =
1707+
{
1708+
"@context": {
1709+
"@RESERVED": "ex:test-function-handler"
1710+
},
1711+
"@RESERVED": "test"
1712+
}
1713+
;
1714+
const expected = [];
1715+
1716+
await _test({
1717+
type: 'expand',
1718+
input,
1719+
expected,
1720+
mapCounts: {
1721+
expansionMap: 2,
1722+
unmappedProperty: {
1723+
'@RESERVED': 1
1724+
},
1725+
unmappedValue: {
1726+
'__unknown__': 1
1727+
}
1728+
},
1729+
eventCounts: {
1730+
codes: {
1731+
'dropping empty object': 1,
1732+
'invalid property expansion': 1,
1733+
'invalid reserved term': 1
1734+
},
1735+
events: 3
1736+
},
1737+
testNotSafe: true,
1738+
testNotStrict: true
1739+
});
1740+
});
17041741
});
17051742

17061743
// FIXME naming

0 commit comments

Comments
 (0)