LiTiang / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

YAML Parse error on config file #163

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Setting up js-test-drive for first time.  Using example code.  When I try to 
run, keep getting this error

Unexpected Runner Condition: ParserException while scanning a block mapping we 
had this expected <block end>, but found org.jvyaml.tokens.ScalarToken

What steps will reproduce the problem?
1. Use sample hello world source and test files including jsTestDriver.conf
2. run this from same directory : java -jar JsTestDriver.jar --tests all
3.

What is the expected output? What do you see instead?
example test run.  Instead I see this: 

while scanning a block mapping
expected <block end>, but found org.jvyaml.tokens.ScalarToken
org.jvyaml.ParserException: ParserException while scanning a block mapping we 
had this expected <block end>, but found org.jvyaml.tokens.ScalarToken
    at org.jvyaml.ParserImpl$26.produce(ParserImpl.java:469)
    at org.jvyaml.ParserImpl.parseStreamNext(ParserImpl.java:796)
    at org.jvyaml.ParserImpl.peekEvent(ParserImpl.java:747)
    at org.jvyaml.ComposerImpl.composeNode(ComposerImpl.java:162)
    at org.jvyaml.ComposerImpl.composeDocument(ComposerImpl.java:95)
    at org.jvyaml.ComposerImpl.getNode(ComposerImpl.java:71)
    at org.jvyaml.BaseConstructorImpl.getData(BaseConstructorImpl.java:88)
    at org.jvyaml.YAML.load(YAML.java:188)
    at org.jvyaml.YAML.load(YAML.java:165)
    at com.google.jstestdriver.config.YamlParser.parse(YamlParser.java:40)
    at com.google.jstestdriver.JsTestDriver.getConfiguration(JsTestDriver.java:114)
    at com.google.jstestdriver.JsTestDriver.main(JsTestDriver.java:68)
Unexpected Runner Condition: ParserException while scanning a block mapping we 
had this expected <block end>, but found org.jvyaml.tokens.ScalarToken
 Use --runnerMode DEBUG for more information.

What version of the product are you using? On what operating system?

JsTestDriver-1.2.2.jar running on Mac OS X version 10.6.4

Please provide any additional information below.

 Installed IntelliJ plugin.  Was able to launch server and capture browser. Created a intellij run configuration to run the tests.  But no feedback when running in Intellij.  When I try from the command line, get the above errors. 

Evaluating javascript unit test tools for our web product.  Would be nice to 
get this working. Already have junit tests in place.  Besides IntelliJ we use 
Maven.  

Original issue reported on code.google.com by TouchB...@gmail.com on 17 Nov 2010 at 12:59

GoogleCodeExporter commented 9 years ago
please attach the config file.

Original comment by corbinrs...@gmail.com on 17 Nov 2010 at 1:27

GoogleCodeExporter commented 9 years ago
config file attached.  Thanks for the help.

Original comment by TouchB...@gmail.com on 17 Nov 2010 at 6:21

Attachments:

GoogleCodeExporter commented 9 years ago
Corbinrs, have you had a chance to look at this issue yet?  Maybe it's 
something simple that I"m overlooking, if so I'd be a bit embarrassed, but 
accepting of the solution.  Our company wants javascript unit testing and so 
far other frameworks have not met our needs.  On paper it looks like 
js-test-driver will meet our needs. But need to prove it first to management.  

Original comment by TouchB...@gmail.com on 18 Nov 2010 at 8:08

GoogleCodeExporter commented 9 years ago
It's the yaml.... sigh.

server: http://localhost:9876

load:
  - src/*.js
  - src-test/*.js

note the spaces around the dashes. review: 
http://www.yaml.org/spec/1.2/spec.html#id2759963 for more infromation.

Original comment by corbinrs...@gmail.com on 18 Nov 2010 at 8:34

GoogleCodeExporter commented 9 years ago
Thank you.  No prior experience using yaml. Looking at the example 
jsTestDriver.config again I see the spaces.  My editing mistake, no need to 
spend time on the details.   I'll check out the yaml spec link.  

Mike

Original comment by TouchB...@gmail.com on 18 Nov 2010 at 9:14