Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error No context found when evaluating is form #124

Closed
PEZ opened this issue Dec 27, 2022 · 2 comments · Fixed by #126
Closed

Error No context found when evaluating is form #124

PEZ opened this issue Dec 27, 2022 · 2 comments · Fixed by #126
Labels
bug Something isn't working test Test runner things

Comments

@PEZ
Copy link
Collaborator

PEZ commented Dec 27, 2022

I can't evaluate is forms. Here's a minimal example:

<user-config>/joyride/src/cljs-test.cljs:

(ns cljs-test
  (:require [cljs.test :refer [deftest is testing]]))

(deftest foo
  (testing "foo"
    (is (= 1 2))))

Evaluating the ns form works fine, but evaluating the is form I get:

; No context found in: sci.ctx-store/*ctx*. Please set it using sci.ctx-store/reset-ctx!

Evaluating the deftest form without the is also works.

@PEZ PEZ added bug Something isn't working test Test runner things labels Dec 27, 2022
@borkdude
Copy link
Collaborator

@PEZ Follow the error message and do this:

https://github.com/babashka/nbb/blob/6a9b6757132092016f92c3c0a4bcecc85a522f4e/src/nbb/core.cljs#L532

The sci.config for cljs.test expects the context in a specific location so it can access it.

@PEZ
Copy link
Collaborator Author

PEZ commented Dec 27, 2022

Thanks, @borkdude, that works great. PR coming up.

PEZ added a commit that referenced this issue Dec 28, 2022
@PEZ PEZ mentioned this issue Dec 28, 2022
@PEZ PEZ closed this as completed in #126 Dec 31, 2022
PEZ added a commit that referenced this issue Dec 31, 2022
* Reset sci context

Fixes #124

* Add vscode-test dependency

* Add vscode test launcher and some tests

* Add integration test step to CI

Fixes #125

* apt-get install libnss

* sudo apt-get update

* sudo apt-get install libnss3-dev

* libxss1 libasound2 libatk-bridge2.0-0 libgtk-3-0 libgbm-dev

* cimg/clojure:1.11-browsers

* Use cljs.test/async

* Check that test step fails if test fails

* Fix failing test again

* Remove redundant test subdir

* Remove mystery copy of lifecycle.cljs

* Save vscode install in cache

* Key vscode test-runner cache on test project package.json

* Restore build before restoring cache

* Rename ws scripts test

* Add npm usage test (fails)

* Disable npm test

* Use (store/get-ctx)  instead of dereffing

* Less roundabout parent dir resolve

* Run all namespaces in one go

* Resolve deffered promise when tests done

* Use waiter promise instead of delay to sync workspace-activate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test Test runner things
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants