mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 13:04:30 -08:00
refactor test_initial_state
This commit is contained in:
@@ -70,12 +70,19 @@ console.time('run')
|
||||
const i = test_initial_state(
|
||||
{}, // files
|
||||
undefined,
|
||||
{project_dir: dir},
|
||||
{entrypoint: 'test/run.js'},
|
||||
{
|
||||
project_dir: dir,
|
||||
entrypoint: 'test/run.js',
|
||||
}
|
||||
)
|
||||
|
||||
if(!i.parse_result.ok) {
|
||||
console.error('Parse errors:', i.parse_result.problems)
|
||||
i.parse_result.problems.forEach(p => {
|
||||
if(p.index != null) {
|
||||
console.error(p.module + ': ' + p.message + ' at ' + i.files[p.module].slice(p.index, p.index + 80))
|
||||
}
|
||||
})
|
||||
throw new Error('parse error')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user