Skip to content

Commit

Permalink
fix: add allowJs: true
Browse files Browse the repository at this point in the history
  • Loading branch information
Ansonhkg committed Sep 20, 2023
1 parent a42c6ad commit 9a61eb6
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 9 deletions.
31 changes: 31 additions & 0 deletions e2e-nodejs/group-pkp-cosmos/test-pkp-cosmos.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import path from 'path';
import { success, fail, testThis } from '../../tools/scripts/utils.mjs';
import LITCONFIG from '../../lit.config.json' assert { type: 'json' };
import { client } from '../00-setup.mjs';

export async function main() {
// ==================== Test Logic ====================
// const res = await client.executeJs({
// authSig: LITCONFIG.CONTROLLER_AUTHSIG,
// code: `(async () => {
// console.log('hello world')
// })();`,
// jsParams: {
// publicKey: LITCONFIG.PKP_PUBKEY,
// },
// });

// ==================== Post-Validation ====================
// if (!res.logs.includes('hello world')) {
// return fail('lit action client should be ready');
// }

// if (!res.success) {
// return fail('response should be success');
// }

// ==================== Success ====================
// return success('Lit Action should log "hello world"');
}

await testThis({ name: path.basename(import.meta.url), fn: main });

This comment has been minimized.

Copy link
@joshLong145

joshLong145 Sep 21, 2023

import.meta.url a bit confused by this. should we also comment this line out if we are commenting out the implementation?

15 changes: 12 additions & 3 deletions packages/constants/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": [
"jest",
"node"
],
"allowJs": true,
},
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
}
"include": [
"jest.config.ts",
"**/*.test.ts",
"**/*.spec.ts",
"**/*.d.ts"
]
}
3 changes: 2 additions & 1 deletion packages/core/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"allowJs": true,
},
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
}
3 changes: 2 additions & 1 deletion packages/encryption/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"allowJs": true,
},
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
}
3 changes: 2 additions & 1 deletion packages/misc/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"allowJs": true,
},
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
}
3 changes: 2 additions & 1 deletion packages/pkp-sui/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"allowJs": true
},
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
}
3 changes: 2 additions & 1 deletion packages/pkp-walletconnect/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"allowJs": true,
},
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
}
3 changes: 2 additions & 1 deletion packages/types/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"allowJs": true,
},
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
}

0 comments on commit 9a61eb6

Please sign in to comment.