Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sebpiq committed Oct 18, 2024
1 parent 3758a0b commit 84d5b11
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 6 additions & 1 deletion src/functional-helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@
*/

import assert from 'assert'
import { countTo } from './functional-helpers'
import { countTo, renderSwitch } from './functional-helpers'

describe('functional-helpers', () => {
describe('countTo', () => {
it('should generate a list to the count non-inclusive', () => {
assert.deepStrictEqual(countTo(3), [0, 1, 2])
})
})
describe('renderSwitch', () => {
it('should render the first route that matches the test', () => {
assert.strictEqual(renderSwitch([false, 'bli'], [true, 'bla'], [true, 'foo']), 'bla')
})
})
})
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export {
FS_OPERATION_SUCCESS,
FS_OPERATION_FAILURE,
} from './stdlib/fs/constants'
export { Engine, Message, MessageToken, FloatArray } from './run/types'
export { Engine, EngineMetadata, Message, MessageToken, FloatArray } from './run/types'
export { createEngine as createAssemblyScriptWasmEngine } from './engine-assemblyscript/run'
export { createEngine as createJavaScriptEngine } from './engine-javascript/run'
export { readMetadata } from './run'
Expand Down
3 changes: 1 addition & 2 deletions src/run/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { CompilerTarget, VariableNamesIndex } from '../compile/types'
import { CompilerTarget } from '../compile/types'
import { readMetadata as readMetadataWasm } from '../engine-assemblyscript/run/metadata'
import { JavaScriptEngineCode } from '../engine-javascript/compile/types'
import { createEngine } from '../engine-javascript/run'
import { proxyWithNameMapping } from './run-helpers'
import { EngineMetadata } from './types'

export const readMetadata = async (
Expand Down

0 comments on commit 84d5b11

Please sign in to comment.