learn-co-curriculum / react-initial-state-lab Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
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)
`
ImageSlider.js prompts the students: "// Bomb Component Code Goes Here"
This should read "// Image Slider Component Code Goes Here"
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 () {
State hasn't been covered yet
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.
i dont understand if im doing this right or not. awesome.
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
.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.