mirror of
https://github.com/morluto/rea.git
synced 2026-12-03 21:46:01 +00:00
fix(javascript): account for active nullish pattern defaults
This commit is contained in:
1 parent
8ae636b6ab
commit
c1943f196c
4 files changed
+18
-3
No files matched your search
@@ -29,6 +29,8 @@ it.each([
|
||||
["void 0", "{}"],
|
||||
["null", "[]"],
|
||||
["null", "{} = {}"],
|
||||
["undefined", "{} = null"],
|
||||
["void 0", "[] = undefined"],
|
||||
] as const)(
|
||||
"leaves bindings after %s matched against %s unproven",
|
||||
(value, pattern) => {
|
||||
@@ -53,6 +55,7 @@ it.each([
|
||||
["const model = { bad: {}, mode: 'one' };", "{}"],
|
||||
["const model = { bad: [], mode: 'one' };", "[]"],
|
||||
["const model = { bad: undefined, mode: 'one' };", "{} = {}"],
|
||||
["const model = { bad: 0, mode: 'one' };", "{} = null"],
|
||||
["const undefined = 0; const model = { bad: undefined, mode: 'one' };", "{}"],
|
||||
] as const)(
|
||||
"preserves the reachable sibling for %s against %s",
|
||||
|
||||
Reference in new issue
Block a user