GithubHelp home page GithubHelp logo

Comments (12)

jehoshua02 avatar jehoshua02 commented on August 23, 2024 3
~/exercism/elm/say
$ elm-test SayTests.elm 
Success! Compiled 1 module.                                         
Successfully generated /var/folders/1p/qm72h6016651chtkxqygy7_w0000gn/T/elm_test_116721-44783-1v0yvok.js

elm-test
--------

Running 17 tests. To reproduce these results, run: elm-test --seed 1611331912


TEST RUN PASSED

Duration: 27 ms
Passed:   17
Failed:   0

from elm.

lpil avatar lpil commented on August 23, 2024 1

Hiya

Even with all the deps installed as instructed in the documentation this error still persists. There is something currently wrong with the test setup that is unrelated to the scripts used to run the elm test bin.

from elm.

jehoshua02 avatar jehoshua02 commented on August 23, 2024 1

Okay, so here's what I had to change:

elm-package.json

        "rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"

SayTests.elm

main : Program Value
main =
    run emit tests

from elm.

kytrinyx avatar kytrinyx commented on August 23, 2024

Is there a means to make locally installed binaries available within the project dir (i.e. elm-test)?

We're actively working on that.

@exercism/elm do you know if it would work to stick stuff in the root directory?

from elm.

tgecho avatar tgecho commented on August 23, 2024

I'm afraid some of our recent test dependency upgrades (#95) may have been done in a very graceful/backwards compatible way. In the process, we removed the runtests.sh/.bat scripts in favor of using the elm-test cli (#76).

These changes shouldn't require any change in how your solution is written, however you wouldn't have a good way to know that the documentation has changed. That's our bad.

I think in the sort term I might put the runtests scripts back to reduce confusion. Ideally we wouldn't need to make these sorts of changes, but I'm at a loss as to how to communicate them short of something like adding a "STUFF CHANGED!" comment to the empty solution file.

from elm.

kytrinyx avatar kytrinyx commented on August 23, 2024

I think in the sort term I might put the runtests scripts back to reduce confusion.

How about sticking the runtests scripts back, but when you run them it echos to go look at the documentation?

I'm at a loss as to how to communicate [these sorts of changes]

Yeah, me too. If our dashboard was better, we could put important notifications there, but right now the dashboard is enough of a mess that I don't know that people would see it.

from elm.

tgecho avatar tgecho commented on August 23, 2024

How about sticking the runtests scripts back, but when you run them it echos to go look at the documentation?

Of course! This is much better than the half baked backwards compatible thing I was trying to whip up.

I'm at a loss as to how to communicate [these sorts of changes]

Yeah, me too.

I've had a few thoughts about what this sort of thing might look like. I'll try to crystalize them a bit and write them up somewhere.

from elm.

cjmochrie avatar cjmochrie commented on August 23, 2024

Maybe I'm missing something, but I've looked at the Elm documentation linked to in PR#101 and following those instructions I'm still getting the stack trace mentioned in the first post.

Is the problem that the existing problems' *Test.elm files will not work with elm-test? Sorry, frustrating to get stuck getting HelloWorld to work... Is there a possible workaround?

from elm.

jehoshua02 avatar jehoshua02 commented on August 23, 2024

Same issue here.

~/exercism/elm/say
$ node --version
v4.2.1
~/exercism/elm/say
$ elm --version
0.17.1
~/exercism/elm/say
$ elm-test --version
0.17.3
~/exercism/elm/say
$ elm-test SayTests.elm 
Success! Compiled 1 module.                                         
Successfully generated /var/folders/1p/qm72h6016651chtkxqygy7_w0000gn/T/elm_test_116721-44584-5r55tr.js
undefined:1929
            throw new Error(
            ^

Error: You are giving module `Main` an argument in JavaScript.
This module does not take arguments though! You probably need to change the
initialization code to something like `Elm.Main.fullscreen()`
    at init (eval at <anonymous> (/Users/jstoutenburg/.nvm/versions/node/v4.2.1/lib/node_modules/elm-test/bin/elm-test:86:37), <anonymous>:1929:10)
    at Object.eval [as callback] (eval at <anonymous> (/Users/jstoutenburg/.nvm/versions/node/v4.2.1/lib/node_modules/elm-test/bin/elm-test:86:37), <anonymous>:1973:17)
    at step (eval at <anonymous> (/Users/jstoutenburg/.nvm/versions/node/v4.2.1/lib/node_modules/elm-test/bin/elm-test:86:37), <anonymous>:2613:39)
    at work [as _onTimeout] (eval at <anonymous> (/Users/jstoutenburg/.nvm/versions/node/v4.2.1/lib/node_modules/elm-test/bin/elm-test:86:37), <anonymous>:2671:15)
    at Timer.listOnTimeout (timers.js:92:15)

from elm.

jehoshua02 avatar jehoshua02 commented on August 23, 2024

Relevant: rtfeldman/node-test-runner#62

from elm.

jehoshua02 avatar jehoshua02 commented on August 23, 2024

@kytrinyx @tgecho

Do you see any problems with this solution?

  1. update every exercise elm-package.json to require node-test-runner 2
  2. and update every test file to Program Value instead of Program Never

If not, that's easy enough I'd be happy to sweep through the exercises and submit a pull request.

from elm.

kytrinyx avatar kytrinyx commented on August 23, 2024

❤️ thank you @jehoshua02 for figuring that out.

from elm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.