Skip to content

Commit cb4df8c

Browse files
authored
Fix failing tests (#135)
1 parent 64d4f81 commit cb4df8c

File tree

7 files changed

+16
-23
lines changed

7 files changed

+16
-23
lines changed

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "flow-cadut",
33
"scripts": {
44
"build": "lerna run build",
5-
"test": "jest",
5+
"test": "lerna run test",
66
"lint": "eslint .",
77
"lintfix": "eslint --fix .",
88
"prerelease": "npm run build && npm run test",

packages/dev-test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "",
66
"main": "index.js",
77
"scripts": {
8-
"test": "jest"
8+
"test": "jest --runInBand"
99
},
1010
"keywords": [],
1111
"author": "",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const contractHolder = {
22
emulator: null,
3-
testnet: "0xa16ab1d0abde3625",
3+
testnet: "0x35717efbbce11c74",
44
mainnet: "0x097bafa4e0b48eef",
55
}

packages/flow-cadut-plugin-find/tests/index.test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ describe("FIND plugin", () => {
1717
return address
1818
}
1919
`
20-
const args = ["find:shiny"]
21-
return mapValuesToCode(code, args)
20+
const args = ["find:bman"]
21+
const [result] = await mapValuesToCode(code, args)
22+
expect(result.value).toBe("0x8bf9ecc3a2b8d7af")
2223
})
2324

2425
it("shall resolve name.find properly", async () => {
@@ -27,7 +28,8 @@ describe("FIND plugin", () => {
2728
return address
2829
}
2930
`
30-
const args = ["shiny.find"]
31-
return mapValuesToCode(code, args)
31+
const args = ["bman.find"]
32+
const [result] = await mapValuesToCode(code, args)
33+
expect(result.value).toBe("0x8bf9ecc3a2b8d7af")
3234
})
3335
})

packages/flow-cadut-views/src/test/try-views.test.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {setEnvironment} from "@onflow/flow-cadut"
22
import {
33
Flovatars,
44
VersusArt,
5-
MotoGP,
65
Ballerz,
76
GoatedGoats,
87
GoatedTraits,
@@ -25,14 +24,6 @@ describe("views", () => {
2524
expect(err).toBeNull()
2625
})
2726

28-
it("fetch motogp", async () => {
29-
await setEnvironment("mainnet")
30-
const [cards, err] = await getView(MotoGP, "0x53f389d96fb4ce5e")
31-
console.log(err)
32-
expect(cards).toBeTruthy()
33-
expect(err).toBeNull()
34-
})
35-
3627
it("fetch ballerz", async () => {
3728
await setEnvironment("mainnet")
3829
const [ballerz, err] = await getView(Ballerz, "0x4c342b6dafb5bcb1")

packages/generator-test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"main": "index.js",
77
"scripts": {
88
"generate": "flow-generate ./cadence ./src/generated",
9-
"test": "node index.js"
9+
"test-generator": "node index.js"
1010
},
1111
"author": "",
1212
"license": "ISC",

0 commit comments

Comments
 (0)