Skip to content

Commit

Permalink
Fix code order in a test
Browse files Browse the repository at this point in the history
  • Loading branch information
akheron committed Aug 20, 2021
1 parent 9e320eb commit 5ae7fda
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/floating/partsOf.spec.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import * as O from '.'

describe('partsOf', () => {
it('get - single argument', () => {
const lens = O.partsOf(O.compose(O.elems, 'foo', O.elems))
const result: Focus = O.get(lens, source)
expect(result).toEqual([1, 2, 3])
})

type Source = { foo: number[] }[]
const source = [{ foo: [1, 2] }, { foo: [] }, { foo: [3] }]

const lens = O.partsOf(O.elems, 'foo', O.elems)
type Focus = number[]

it('get - single argument', () => {
const lens = O.partsOf(O.compose(O.elems, 'foo', O.elems))
const result: Focus = O.get(lens, source)
expect(result).toEqual([1, 2, 3])
})

it('get', () => {
const result: Focus = O.get(lens, source)
expect(result).toEqual([1, 2, 3])
Expand Down

0 comments on commit 5ae7fda

Please sign in to comment.