UNPKG

@informalsystems/quint

Version:

Core tool for the Quint specification language

28 lines 1.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // Unit tests for CLI procedures const mocha_1 = require("mocha"); const chai_1 = require("chai"); const cliCommands_1 = require("../src/cliCommands"); const exModule = ` module exModule { const C: int val s: Set[int] = Set(1, 2) } `; const loaded = { args: {}, path: 'mocked/path', sourceCode: new Map([['mocked/path', exModule]]), stage: 'loading', warnings: [], }; (0, mocha_1.describe)('the parse CLI routine', () => (0, mocha_1.it)('succeeds with "parsed" status', () => { (0, cliCommands_1.parse)(loaded).then(res => res.map(s => chai_1.assert.equal(s.stage, 'parsing'))); })); (0, mocha_1.describe)('the typecheck CLI routine', () => (0, mocha_1.it)('succeeds with "typechecked" status', () => { (0, cliCommands_1.parse)(loaded) .then(parsed => parsed.asyncChain(cliCommands_1.typecheck)) .then(res => res.map(s => chai_1.assert.equal(s.stage, 'typechecking'))); })); //# sourceMappingURL=cli.test.js.map