Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nezouse committed Jun 10, 2024
1 parent 88c606b commit 7b49fae
Show file tree
Hide file tree
Showing 9 changed files with 151 additions and 26 deletions.
12 changes: 9 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@
"license": "MIT",
"version": "1.3.0",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"scripts": {
"typecheck": "tsc --noEmit",
"lint": "pnpm typecheck && biome check .",
Expand All @@ -25,6 +31,6 @@
"tsx": "^4.7.1",
"typescript": "^5.4.2",
"viem": "^2.9.27",
"vitest": "^1.5.2"
"vitest": "^1.6.0"
}
}
8 changes: 4 additions & 4 deletions packages/core/test/OpCodeBuilder.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { OpCodeBuilder } from 'src/OpCodeBuilder.js'
import { OPCODES, type OpCodeName } from 'src/constants/opcodes.js'
import { InvalidBytesSizeError } from 'src/errors/InvalidBytesSizeError.js'
import { UnevenBytesLengthError } from 'src/errors/UnevenBytesLengthError.js'
import { beforeEach, describe, expect, it } from 'vitest'
import { OpCodeBuilder } from '../src/OpCodeBuilder.js'
import { OPCODES, type OpCodeName } from '../src/constants/opcodes.js'
import { InvalidBytesSizeError } from '../src/errors/InvalidBytesSizeError.js'
import { UnevenBytesLengthError } from '../src/errors/UnevenBytesLengthError.js'

describe('padHex', () => {
let opcodeBuilder: OpCodeBuilder
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/integration/ByteCodeCaller.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { startAnvil, stopAnvil } from '@bytecodecaller/testing'
import { getBytecodeCallerData } from 'src/getBytecodeCallerData.js'
import { decodeFunctionResult, encodeFunctionData } from 'viem'
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
import { getBytecodeCallerData } from '../../src/getBytecodeCallerData.js'
import { getAnvilClient } from './server/client.js'

describe('ByteCodeCaller', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/utils/padHex.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { padHex } from 'src/utils/padHex.js'
import { describe, expect, it } from 'vitest'
import { padHex } from '../../src/utils/padHex.js'

describe('padHex', () => {
it('empty string', () => {
Expand Down
1 change: 0 additions & 1 deletion packages/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"esModuleInterop": true,
"target": "esnext",
Expand Down
10 changes: 8 additions & 2 deletions packages/viem/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@
"license": "MIT",
"version": "1.2.0",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"scripts": {
"typecheck": "tsc --noEmit",
"lint": "pnpm typecheck && biome check .",
Expand Down
2 changes: 1 addition & 1 deletion packages/viem/test/integration/server/client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { deployContracts, getAnvil } from '@bytecodecaller/testing'
import { callBytecodeExtension } from 'src/index.js'
import { http, createPublicClient } from 'viem'
import { callBytecodeExtension } from '../../../src/index.js'

export async function getAnvilClient() {
const anvil = await getAnvil()
Expand Down
1 change: 0 additions & 1 deletion packages/viem/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"esModuleInterop": true,
"target": "esnext",
Expand Down
139 changes: 127 additions & 12 deletions pnpm-lock.yaml

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

0 comments on commit 7b49fae

Please sign in to comment.