1- import { expect , test } from "bun:test" ;
21import { BunContext } from "@effect/platform-bun" ;
2+ import { expect , test } from "bun:test" ;
33import { ConfigProvider , Effect , Schema } from "effect" ;
44import * as loaders from "../src/loaders" ;
55
@@ -31,7 +31,8 @@ test("loads JSON collection from files", async () => {
3131 program . pipe ( Effect . provide ( BunContext . layer ) ) ,
3232 ) ;
3333
34- expect ( res ) . toEqual ( expectedData ) ;
34+ expect ( res ) . toEqual ( expect . arrayContaining ( expectedData ) ) ;
35+ expect ( res ) . toHaveLength ( expectedData . length ) ;
3536} ) ;
3637
3738test ( "loads JSON collection from lines file" , async ( ) => {
@@ -46,7 +47,8 @@ test("loads JSON collection from lines file", async () => {
4647 program . pipe ( Effect . provide ( BunContext . layer ) ) ,
4748 ) ;
4849
49- expect ( res ) . toEqual ( expectedData ) ;
50+ expect ( res ) . toEqual ( expect . arrayContaining ( expectedData ) ) ;
51+ expect ( res ) . toHaveLength ( expectedData . length ) ;
5052} ) ;
5153
5254test ( "loads YAML collection from files" , async ( ) => {
@@ -61,7 +63,8 @@ test("loads YAML collection from files", async () => {
6163 program . pipe ( Effect . provide ( BunContext . layer ) ) ,
6264 ) ;
6365
64- expect ( res ) . toEqual ( expectedData ) ;
66+ expect ( res ) . toEqual ( expect . arrayContaining ( expectedData ) ) ;
67+ expect ( res ) . toHaveLength ( expectedData . length ) ;
6568} ) ;
6669
6770test ( "loads YAML collection from stream file" , async ( ) => {
@@ -76,5 +79,6 @@ test("loads YAML collection from stream file", async () => {
7679 program . pipe ( Effect . provide ( BunContext . layer ) ) ,
7780 ) ;
7881
79- expect ( res ) . toEqual ( expectedData ) ;
82+ expect ( res ) . toEqual ( expect . arrayContaining ( expectedData ) ) ;
83+ expect ( res ) . toHaveLength ( expectedData . length ) ;
8084} ) ;
0 commit comments