mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-19 22:55:44 +01:00
Answer architecture round 1: name a non-string by typeof alone, name and comment what the seats could not read, file items 81 and 82
This commit is contained in:
@@ -85,7 +85,9 @@ function table(...rows: AdfNode[]): AdfNode {
|
||||
}
|
||||
|
||||
test('refuses a value that is not a string, in both readers, at the start of the input', () => {
|
||||
const found: [unknown, string][] = [[null, 'null'], [undefined, 'undefined'], [42, '42'], [{}, 'an object'], [['x'], 'an array']]
|
||||
const revoked = Proxy.revocable({}, {})
|
||||
revoked.revoke()
|
||||
const found: [unknown, string][] = [[null, 'null'], [undefined, 'undefined'], [42, 'a number'], [10n, 'a bigint'], [['x'], 'an object'], [revoked.proxy, 'an object']]
|
||||
for (const read of [markdownToAdf, plainMarkdownToAdf]) {
|
||||
for (const [value, described] of found) {
|
||||
assert.deepEqual(Reflect.apply(read, undefined, [value]), {
|
||||
|
||||
Reference in New Issue
Block a user