Skip to content

Commit

Permalink
Setup tests runner
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhanshuguptagit committed Nov 2, 2023
1 parent 52583e1 commit e24166d
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ pom.xml.asc
.clj-kondo/
.lsp/
output.js
.calva/
tests.js
.calva/
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,17 @@ A repository with the accompanying research work will be put up soon.
Bean is written in [ClojureScript](https://clojurescript.org/). You'll need [npm and nodejs](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) installed. Then run

```
npx install
shadow-cljs watch ui
npm install
npx shadow-cljs watch ui
```

You can access Bean running locally at http://localhost:8090.

#### Tests
```
npx shadow-cljs compile test && node tests.js
```

## Authors
- [Prabhanshu Gupta](https://github.com/prabhanshuguptagit)
- [Ravi Chandra Padmala](https://github.com/neenaoffline)
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "bean",
"version": "0.0.1",
"private": true,
"prepare": "husky install",
"devDependencies": {
"shadow-cljs": "2.25.2"
},
Expand Down
8 changes: 6 additions & 2 deletions shadow-cljs.edn
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
;; shadow-cljs configuration
{:source-paths
["src/"]
["src/"
"test/"]

:dependencies
[[instaparse "1.4.12"]
Expand All @@ -14,4 +15,7 @@
:ui {:target :browser
:output-dir "public/js"
:asset-path "/js"
:modules {:main {:entries [bean.ui.main]}}}}}
:modules {:main {:entries [bean.ui.main]}}}
:test {:target :node-test
:output-to "tests.js"
:ns-regexp "-test$"}}}
2 changes: 1 addition & 1 deletion test/bean_tests/core.cljs → test/bean/core_test.cljs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns bean-tests.core
(ns bean.core-test
(:require [clojure.test :refer [run-all-tests]]))

(comment (run-all-tests))
2 changes: 1 addition & 1 deletion test/bean_tests/grid.cljs → test/bean/grid_test.cljs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns bean-tests.grid
(ns bean.grid-test
(:require [bean.grid :refer [parse-grid
make-depgraph
eval-sheet]]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns bean-tests.interpreter
(ns bean.interpreter-test
(:require [bean.interpreter :refer [bean-op-+ apply-op]]
[clojure.test :refer [deftest testing is]]))

Expand Down
4 changes: 2 additions & 2 deletions test/bean_tests/parser.cljs → test/bean/parser_test.cljs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns bean-tests.parser
(ns bean.parser-test
(:require [bean.parser :refer [parse parse-statement]]
[clojure.test :refer [deftest testing is]]))

Expand Down Expand Up @@ -37,4 +37,4 @@
[:Expression [:CellRef "A" "1"]]
[:Operation "+"]
[:Expression [:Value [:Integer "9"]]]]]]
(parse-statement "foo:99\n\n\nbar :A1+9")))))
(parse-statement "foo:99\n\n\nbar :A1+9")))))
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns bean-tests.provenance
(ns bean.provenance-test
(:require [clojure.test :refer [deftest testing is run-all-tests]]
[bean.provenance :as provenance]
[bean.grid :as grid]))
Expand Down

0 comments on commit e24166d

Please sign in to comment.