Skip to content

Commit

Permalink
fixed devDep cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
arietrouw committed Feb 5, 2024
1 parent 67eea6b commit d5775d6
Show file tree
Hide file tree
Showing 6 changed files with 135 additions and 124 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
},
"description": "Primary SDK for using XYO Protocol 2.0",
"devDependencies": {
"@types/jest": "^29.5.11",
"@types/jest": "^29.5.12",
"@types/supertest": "^6.0.2",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@xylabs/eslint-config": "^3.2.42",
"@xylabs/forget": "^2.14.0",
"@xylabs/ts-scripts-yarn3": "^3.2.42",
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@xyo-network/witness": "workspace:~"
},
"devDependencies": {
"@swc/core": "^1.3.107",
"@swc/core": "^1.4.0",
"@xylabs/delay": "^2.14.0",
"@xylabs/ts-scripts-yarn3": "^3.2.42",
"@xylabs/tsconfig": "^3.2.42",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@xylabs/ts-scripts-yarn3": "^3.2.42",
"@xylabs/tsconfig": "^3.2.42",
"@xyo-network/account": "workspace:~",
"@xyo-network/archivist-wrapper": "workspace:~",
"typescript": "^5.3.3"
},
"description": "Primary SDK for using XYO Protocol 2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/
import { Account } from '@xyo-network/account'
import { isArchivistInstance, isArchivistModule } from '@xyo-network/archivist-model'
import { ArchivistWrapper } from '@xyo-network/archivist-wrapper'
import { PayloadBuilder } from '@xyo-network/payload-builder'

import { MemoryArchivist } from '../MemoryArchivist'
Expand Down Expand Up @@ -35,18 +34,4 @@ describe('MemoryArchivist', () => {
expect(result.length).toEqual(payloads.length)
expect(result[0].schema).toEqual(payloads[0].schema)
})

it('should return same items inserted (wrapped)', async () => {
const archivist = ArchivistWrapper.wrap(
await MemoryArchivist.create({ account: Account.randomSync(), config: { schema: MemoryArchivist.configSchema } }),
Account.randomSync(),
)

const payloads = [await PayloadBuilder.build({ schema: 'network.xyo.test' })]
const result = await archivist.insert(payloads)

expect(result).toEqual(payloads)
expect(result.length).toEqual(payloads.length)
expect(result[0].schema).toEqual(payloads[0].schema)
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* @jest-environment jsdom
*/
import { Account } from '@xyo-network/account'
import { MemoryArchivist } from '@xyo-network/archivist-memory'
import { PayloadBuilder } from '@xyo-network/payload-builder'

import { ArchivistWrapper } from '../ArchivistWrapper'

/**
* @group module
* @group archivist
*/
describe('MemoryArchivist (Wrapped)', () => {
it('should return same items inserted (wrapped)', async () => {
const archivist = ArchivistWrapper.wrap(
await MemoryArchivist.create({ account: Account.randomSync(), config: { schema: MemoryArchivist.configSchema } }),
Account.randomSync(),
)

const payloads = [await PayloadBuilder.build({ schema: 'network.xyo.test' })]
const result = await archivist.insert(payloads)

expect(result).toEqual(payloads)
expect(result.length).toEqual(payloads.length)
expect(result[0].schema).toEqual(payloads[0].schema)
})
})
Loading

0 comments on commit d5775d6

Please sign in to comment.