feat: add testing to create-fuels
#12796
Annotations
6 errors
packages/create-fuels/src/cli.ts#L131
Error: ENOENT: no such file or directory, lstat '/home/runner/work/fuels-ts/fuels-ts/packages/create-fuels/templates/nextjs/.next/cache/config.json'
❯ Module.runScaffoldCli packages/create-fuels/src/cli.ts:131:3
❯ packages/create-fuels/test/cli.test.ts:78:5
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'lstat', path: '/home/runner/work/fuels-ts/fuels-ts/packages/create-fuels/templates/nextjs/.next/cache/config.json' }
|
packages/errors/src/test-utils/safeExec.ts#L102
Error: Passed-in lambda didn't throw.
❯ Module.expectToThrowFuelError packages/errors/src/test-utils/safeExec.ts:102:11
❯ packages/fuel-gauge/src/transaction-response.test.ts:238:5
|
packages/create-fuels/src/lib/rewriteTemplateFiles.test.ts#L48
AssertionError: expected '{\n "name": "template-nextjs",\n "v…' to contain '"fuels": "^0.0.0"'
- Expected
+ Received
- "fuels": "^0.0.0"
+ {
+ "name": "template-nextjs",
+ "version": "0.1.3",
+ "private": true,
+ "scripts": {
+ "prebuild": "fuels build",
+ "fuels:dev": "fuels dev",
+ "dev": "next dev",
+ "build": "pnpm run prebuild && next build",
+ "start": "next start",
+ "lint": "next lint",
+ "test": "vitest"
+ },
+ "dependencies": {
+ "@fuels/connectors": "^0.8.1",
+ "@fuels/react": "^0.20.0",
+ "fuels": "0.92.0",
+ "@tanstack/react-query": "^5.29.2",
+ "dotenv": "^16.4.5",
+ "next": "14.2.4",
+ "react": "^18.3",
+ "react-dom": "^18.3",
+ "react-hot-toast": "^2.4.1",
+ "react-use": "^17.5.0"
+ },
+ "devDependencies": {
+ "@types/node": "^20",
+ "@types/react": "^18.3",
+ "@types/react-dom": "^18.3",
+ "autoprefixer": "^10.4.19",
+ "eslint": "^8",
+ "eslint-config-next": "14.2.4",
+ "postcss": "^8",
+ "tailwindcss": "^3.4.4",
+ "typescript": "~5.4.5",
+ "vitest": "^1.6.0"
+ }
+ }
+
❯ packages/create-fuels/src/lib/rewriteTemplateFiles.test.ts:48:25
|
packages/create-fuels/src/lib/rewriteTemplateFiles.ts#L23
Error: ENOENT: no such file or directory, open '/home/runner/work/fuels-ts/fuels-ts/packages/create-fuels/templates/nextjs/fuels.config.ts'
❯ Proxy.readFileSync node:fs:448:20
❯ Module.rewriteTemplateFiles packages/create-fuels/src/lib/rewriteTemplateFiles.ts:23:9
❯ packages/create-fuels/src/lib/rewriteTemplateFiles.test.ts:79:5
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: '/home/runner/work/fuels-ts/fuels-ts/packages/create-fuels/templates/nextjs/fuels.config.ts' }
|
packages/create-fuels/test/utils/bootstrapProject.ts#L57
Error: ENOTEMPTY: directory not empty, rmdir '/home/runner/work/fuels-ts/fuels-ts/packages/create-fuels/templates/nextjs/.next'
❯ Object.rmdirSync node:fs:1217:11
❯ Proxy.rmSync node:fs:1266:10
❯ Module.resetFilesystem packages/create-fuels/test/utils/bootstrapProject.ts:57:5
❯ packages/create-fuels/src/lib/rewriteTemplateFiles.test.ts:32:5
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -39, code: 'ENOTEMPTY', syscall: 'rmdir', path: '/home/runner/work/fuels-ts/fuels-ts/packages/create-fuels/templates/nextjs/.next' }
|
|
This job failed
Loading