Skip to content

Commit

Permalink
Remove a dependency
Browse files Browse the repository at this point in the history
The it-all module seems to be incompatible with Jest's ESM support. I have no idea why, but it's easy enough to replace with Effect.

Refs #1834, #1900
  • Loading branch information
thewilkybarkid committed Sep 2, 2024
1 parent a117a01 commit f6031ec
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
13 changes: 0 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
"imagemin": "^9.0.0",
"imagemin-svgo": "^11.0.1",
"iso-639-3": "^2.2.0",
"it-all": "^1.0.6",
"jest": "^29.7.0",
"mini-css-extract-plugin": "^2.9.0",
"node-mocks-http": "^1.15.1",
Expand Down
10 changes: 9 additions & 1 deletion test/log-in/log-in.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { test } from '@fast-check/jest'
import { describe, expect, jest } from '@jest/globals'
import { SystemClock } from 'clock-ts'
import cookieSignature from 'cookie-signature'
import { Chunk, Effect, identity, Stream } from 'effect'
import fetchMock from 'fetch-mock'
import { format } from 'fp-ts-routing'
import * as E from 'fp-ts/lib/Either.js'
import * as IO from 'fp-ts/lib/IO.js'
import * as TE from 'fp-ts/lib/TaskEither.js'
import { MediaType, Status } from 'hyper-ts'
import all from 'it-all'
import Keyv from 'keyv'
import { rawHtml } from '../../src/html.js'
import * as _ from '../../src/log-in/index.js'
Expand Down Expand Up @@ -466,3 +466,11 @@ describe('authenticateError', () => {
})
})
})

function all<A>(iterable: AsyncIterable<A>): Promise<ReadonlyArray<A>> {
return Stream.fromAsyncIterable(iterable, identity).pipe(
Stream.runCollect,
Effect.map(Chunk.toArray),
Effect.runPromise,
)
}

0 comments on commit f6031ec

Please sign in to comment.