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

Add test for symbol resolution in map keys #160

Closed
lynaghk opened this issue Mar 24, 2017 · 1 comment
Closed

Add test for symbol resolution in map keys #160

lynaghk opened this issue Mar 24, 2017 · 1 comment

Comments

@lynaghk
Copy link
Contributor

lynaghk commented Mar 24, 2017

Hello,

Thanks for all of your work on Sablono, it's a project that I use all the time and appreciate.

In Sablono 0.7.7, local variables in the map key position are not resolved:

(js/ReactDOMServer.renderToStaticMarkup
 (html
  (let [k :data-foo]
    [:div {k "bar"}])))
;;=> <div k="bar"></div>

Here the local k isn't resolving into :data-foo.

Everything works properly in "0.8.0-SNAPSHOT" on 2017 March 24, but I couldn't tell from the commits or changelog whether this fix was deliberate or an accident.

I want to ensure that tests exist in Sablono to prevent a regression.

I tried to create a test myself in the Sablono repository, but I couldn't find any documentation in the wiki or repository about how to actually run the cljs test infrastructure.
If such documentation is added, I would be happy to turn this issue into a pull request that adds a test.

Thanks,

Kevin

@r0man
Copy link
Owner

r0man commented Mar 25, 2017

Hi @lynaghk,

good to hear you are still using ClojureScript. I think the fix was an accident. I'm using lein-doo to run the ClojureScript tests on Node.js and PhantomJS. A test for this would be great! I added a FAQ section to explain how to run the tests:

https://github.com/r0man/sablono#how-to-run-the-tests

Thanks, Roman.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants