Skip to content
Myr

test(vanilla/shallow): add test for pure iterable with different values returns false (#3129)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Wonsuk Choi · committed by GitHub · parent 5df8085 · Browse files · 1 file+18 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+18 added−0 removed

  • tests:+18 added−0 removed

1 file+18 added−0 removed

modified:tests/vanilla/shallow.test.tsx+18 added
198 unmodified lines
199 }200 expect(Symbol.iterator in gen()).toBe(true)201 expect(shallow(gen(), gen())).toBe(true)202 })203204 it('pure iterable with different values returns false', () => {205 const iterableA = {206 [Symbol.iterator]: function* (): Generator<number> {207 yield 1208 yield 2209 },210 }211212 const iterableB = {213 [Symbol.iterator]: function* (): Generator<number> {214 yield 1215 yield 3216 },217 }218219 expect(shallow(iterableA, iterableB)).toBe(false)220 })221})222223describe('unsupported cases', () => {224 it('date', () => {
8 unmodified lines