मैंने https://www में चरणों का पालन किया है कोनाचा को सेटअप करने के लिए .botreetechnologies.com/blog/test-rails-app-using-mocha-js-chai-js

मैंने कल्पना/जावास्क्रिप्ट फ़ोल्डर में निम्नानुसार एक साधारण हैलो वर्ल्ड टेस्ट लिखा:

var assert = require('assert');
describe('HelloWorld Module', function() {
  it('should return -1 when "Hello" is missing', function() {
    assert.equal(-1, "Hallo World".indexOf("Hello"));
  });
  it('should return 0 when sentence starts with Hello', function() {
    assert.equal(0, "Hello World, how are you?".indexOf("Hello"));
  });
});

जब मैं $bundle exec rake konacha:run --trace चलाता हूं, तो यह निम्न त्रुटि देता है:

rake aborted!
Don't know how to build task 'konacha:run' (see --tasks)
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/task_manager.rb:71:in `[]'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:151:in `invoke_task'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:108:in `each'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:108:in `block in top_level'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:117:in `run_with_threads'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:102:in `top_level'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:80:in `block in run'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:178:in `standard_exception_handling'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:77:in `run'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
/home/vagrant/.rbenv/versions/2.2.10/bin/rake:23:in `load'
/home/vagrant/.rbenv/versions/2.2.10/bin/rake:23:in `<top (required)>'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:74:in `load'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:74:in `kernel_load'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:28:in `run'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/cli.rb:463:in `exec'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/cli.rb:27:in `dispatch'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/cli.rb:18:in `start'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/exe/bundle:30:in `block in <top (required)>'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/exe/bundle:22:in `<top (required)>'
/home/vagrant/.rbenv/versions/2.2.10/bin/bundle:23:in `load'
/home/vagrant/.rbenv/versions/2.2.10/bin/bundle:23:in `<main>'

क्या कोई कृपया इसमें मेरी मदद कर सकता है।

0
aria 30 अप्रैल 2019, 09:37

1 उत्तर

सबसे बढ़िया उत्तर

मुझे मणि को न केवल जेमफाइल के परीक्षण समूह में बल्कि विकास समूह में भी शामिल करना था। उसके बाद काम करना प्रतीत होता था।

0
aria 30 अप्रैल 2019, 08:54