Skip to content

Commit 9c75c17

Browse files
committed
test evaluation of editor state
1 parent 0ad95a5 commit 9c75c17

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

test/lang-clojure-eval.test.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ import { EditorState } from "@codemirror/state"
33
import { evalString, sciInit } from "../src/sci"
44
import { clojure } from "../src/clojure"
55

6-
test('evalString()', () => {
7-
let ctx = sciInit()
8-
expect(evalString(ctx, "(+ 1 2 3)")).toBe("6")
9-
})
10-
116
describe('Editor state', () => {
127
let state = EditorState.create({
138
doc: `(map inc (range 5))`,
@@ -17,7 +12,8 @@ describe('Editor state', () => {
1712
expect(state.doc.text[0]).eq("(map inc (range 5))")
1813
})
1914

20-
it('bar', () => {
21-
expect(1 + 1).eq(2)
15+
it('Evaluates Clojure code', () => {
16+
let ctx = sciInit()
17+
expect(evalString(ctx, state.doc.text[0])).eq("(1 2 3 4 5)")
2218
})
2319
})

0 commit comments

Comments
 (0)