Giter Club home page Giter Club logo

Comments (3)

sgharms avatar sgharms commented on September 13, 2024

@ivalentine

I can reproduce this issue in Learn IB IDE, but not in my local env.

I have a preliminary solution though: changing mocha dependency to "mocha": "^6.1.4" and then re-running yarn install gets IB IDE working. I've added this as a PR #6.

I'm going to flag @maxwellbenton to verify that change as a fix and we'll merge once validated.

from git-basics-lab.

sgharms avatar sgharms commented on September 13, 2024

@maxwellbenton Can you verify my PR here. It's a major bump to package.json and I want to make sure it's not better to either:

  1. Not specify and let some other application drag up the best mocha version it can find
  2. It's OK to bump to a 6x from a 5x.

I think you've been closer to this recently and have an opinion. LMK if I've done the right thing.

from git-basics-lab.

maxwellbenton avatar maxwellbenton commented on September 13, 2024

Hey @sgharms,

The bump does seem to fix the error in the in IBIDE, but testing it locally, I am getting the test to work and it seems to finish testing fine, but an error is produced in mocha immediately after and hangs there until forced to stop:

	9: from /Users/flatironschool/.rvm/gems/ruby-2.6.1/bin/learn-test:23:in `<main>'
	8: from /Users/flatironschool/.rvm/gems/ruby-2.6.1/bin/learn-test:23:in `load'
	7: from /Users/flatironschool/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/bin/learn-test:68:in `<top (required)>'
	6: from /Users/flatironschool/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/lib/learn_test/runner.rb:20:in `run'
	5: from /Users/flatironschool/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/lib/learn_test/runner.rb:20:in `fork'
	4: from /Users/flatironschool/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/lib/learn_test/runner.rb:21:in `block in run'
	3: from /Users/flatironschool/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/lib/learn_test/runner.rb:44:in `report_and_clean'
	2: from /Users/flatironschool/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/lib/learn_test/reporter.rb:13:in `report'
	1: from /Users/flatironschool/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/lib/learn_test/reporter.rb:47:in `report'
/Users/flatironschool/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/lib/learn_test/strategies/mocha.rb:42:in `results': undefined method `[]' for nil:NilClass (NoMethodError)

Something is changing in the way that learn is reporting the results. If this script is added to the package.json file, it will test and produce .results.json correctly (when running npm test, not learn):

"scripts": {
    "test": "mocha -R mocha-multi --reporter-options spec=-,json=.results.json"
  },

On mocha ^5.2.0, this lab doesn't seem to produce .results.json at all. On ^6.1.4, it creates the file but does not populate it, leading to an error likely because the file is empty. This doesn't seem to be happening on other labs I test when bumping mocha.

from git-basics-lab.

Related Issues (11)

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.