This shows a strange console.warn issue with Automerge when used in Jest tests using the JSDom environment.
-
Clone this repo
-
Run
npm install -
Run
npm run repro -
Observe the console output:
> [email protected] repro
> jest index.test.js
console.warn
using deprecated parameters for `initSync()`; pass a single object instead
> 1 | import { Repo } from "@automerge/automerge-repo";
| ^
2 | // ^ causes console.warn about "using deprecated parameters for `initSync()`"
3 |
4 | test("repro", () => {
at initSync (node_modules/@automerge/automerge/dist/cjs/fullfat_base64.cjs:2084:15)
at Object.<anonymous> (node_modules/@automerge/automerge/dist/cjs/fullfat_base64.cjs:2210:1)
at Object.require (node_modules/@automerge/automerge-repo/dist/entrypoints/fullfat.js:9:1)
at Object.require (index.test.js:1:1)
PASS ./index.test.js
✓ repro (2 ms)