Giter VIP home page Giter VIP logo

react-initial-state-lab's Issues

No Test Files Found, Cannot Run Learn Tests

Could not run learn tests
Error terminal output: `Warning: Could not find any test files matching pattern: test
No test files found

No test files found
user@user-MacBook-Pro react-initial-state-lab-dc-web-091619 % Traceback (most recent call last):

9: from /Users/username/.rvm/gems/ruby-2.6.1/bin/learn-test:23:in `<main>'
     8: from /Users/username/.rvm/gems/ruby-2.6.1/bin/learn-test:23:in `load'
     7: from /Users/username/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/bin/learn-test:68:in `<top (required)>'
     6: from /Users/username/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/lib/learn_test/runner.rb:20:in `run'
     5: from /Users/username/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/lib/learn_test/runner.rb:20:in `fork'
     4: from /Users/username/.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/username/.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/username/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/lib/learn_test/reporter.rb:13:in `report'
     1: from /Users/username/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/lib/learn_test/reporter.rb:47:in `report'
/Users/username/.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)

`

Typo on test: currentSlideIndex should be secondsLeft

line 24 of index-test.js:

describe('<Bomb />', function () {
  const wrapper = shallow(<Bomb initialCount={120} />);

  it('should set the `currentSlideIndex` to the value of the `initialCount` prop', function () {

should be:

describe('<Bomb />', function () {
  const wrapper = shallow(<Bomb initialCount={120} />);

  it('should set the `secondsLeft` to the value of the `initialCount` prop', function () {

Contradicting usages

In the previous lesson we learned:

While this is all perfectly valid React code, storing computed values in your state (in this case, fullAddress) should be avoided. There's no good reason for the full address to go into our state, since we're just using props to 'compute' the full address. Instead, we should use the component's props directly

But in this lab you are asking us to do precisely the opposite.

` constructor(props) {
super();

this.state = {
  secondsLeft: props.initialCount
}

}`

Furthermore, the application of this code is confusing.

I feel there are many gaps in the React curriculum, making it very hard to learn!

Hope the React curriculum can be updated, it's vague and it assumes we know a lot of basic concepts that the curriculum hasn't properly explained.

Cannot Run Learn Tests

All tests are passing, but freeze and never submit the passing of Local Tests on learn. Doesn't allow us to move forward with other lessons via learn open.

Ran learn got mocha error

received error:

11: from /Users/alexsilver/.rvm/gems/ruby-2.6.1/bin/ruby_executable_hooks:24:in <main>' 10: from /Users/alexsilver/.rvm/gems/ruby-2.6.1/bin/ruby_executable_hooks:24:in eval'
9: from /Users/alexsilver/.rvm/gems/ruby-2.6.1/bin/learn-test:23:in <main>' 8: from /Users/alexsilver/.rvm/gems/ruby-2.6.1/bin/learn-test:23:in load'
7: from /Users/alexsilver/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/bin/learn-test:68:in <top (required)>' 6: from /Users/alexsilver/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/lib/learn_test/runner.rb:20:in run'
5: from /Users/alexsilver/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/lib/learn_test/runner.rb:20:in fork' 4: from /Users/alexsilver/.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/alexsilver/.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/alexsilver/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/lib/learn_test/reporter.rb:13:in report'
1: from /Users/alexsilver/.rvm/gems/ruby-2.6.1/gems/learn-test-2.6.1/lib/learn_test/reporter.rb:47:in report' /Users/alexsilver/.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)

Not sure if me or files

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.