Skip to content

Commit c9f35f0

Browse files
committed
test: compile add url config
1 parent 5c056df commit c9f35f0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/compile.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ import * as cleapi from '../src/index'
77
import { loadYamlFromPath } from './utils/yaml'
88
import { createOnNonexist } from './utils/file'
99
import { fixtures } from './fixureoptions'
10+
import { config } from './config'
1011

1112
(global as any).__BROWSER__ = false
1213

1314
function readFile(filepath: string) {
1415
return fs.readFileSync(filepath, 'utf-8')
1516
}
1617

17-
const pathfromfixtures = 'dsp/ethereum(storage)'
18-
// const pathfromfixtures = 'dsp/ethereum.unsafe-ethereum'
18+
// const pathfromfixtures = 'dsp/ethereum(storage)'
19+
const pathfromfixtures = 'dsp/ethereum(event)'
20+
// const pathfromfixtures = 'dsp/ethereum.unsafe'
1921
const option = fixtures[pathfromfixtures]
2022

2123
describe('test compile', async () => {
@@ -36,7 +38,7 @@ export async function testCompile(option: any) {
3638
'src/cle.yaml': readFile(yamlPath),
3739
}
3840

39-
const result = await cleapi.compile(sources)
41+
const result = await cleapi.compile(sources, { compilerServerEndpoint: config.CompilerServerEndpoint })
4042

4143
if ((result?.stderr as any)?.length > 0)
4244
throw new Error(result?.stderr?.toString())

0 commit comments

Comments
 (0)