Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

We should also run the test in non-checked mode #1103

Open
vicb opened this issue Jun 4, 2014 · 8 comments
Open

We should also run the test in non-checked mode #1103

vicb opened this issue Jun 4, 2014 · 8 comments

Comments

@vicb
Copy link
Contributor

vicb commented Jun 4, 2014

We run quite some code in assert()s

It would be better to also the tests in non-checked to make sure everything is also fine.

See #1097 (comment) for an example of a non-checked mode failure only

@jbdeboer
Copy link
Contributor

jbdeboer commented Jun 4, 2014

+1

@vsavkin
Copy link
Contributor

vsavkin commented Jun 16, 2014

I'm working on it

@vsavkin
Copy link
Contributor

vsavkin commented Jun 18, 2014

Do you think testing non-checked mode for Dart only is OK? Or should we cover both Dart and Dart2JS?

@mvuksano
Copy link
Contributor

Once you compile dart into JavaScript there's no more checked mode. Checked
mode is only aplickable to dart.
On 19/06/2014 1:29 AM, "Victor Savkin" [email protected] wrote:

Do you think testing non-checked mode for Dart only is OK? Or should we
cover both Dart and Dart2JS?


Reply to this email directly or view it on GitHub
#1103 (comment)
.

@vsavkin
Copy link
Contributor

vsavkin commented Jun 19, 2014

@markovuksanovic you are right that after compilation there is no more checked mode. But you can still include/omit runtime assertions when compiling a Dart program to JS, which somewhat corresponds to running your program in checked/non-checked mode. And it looks like right when running Angular specs we always include those assertions.

@vicb
Copy link
Contributor Author

vicb commented Jun 19, 2014

As discussed with Victor, testing Dart only seems a good option:

  • it is fast,
  • testing generated JS code is mostly testing the dart2js compiler, not the our code.

But if we expect the majority of users to use the JS version, it might also be a good idea to test it...

@vmendi
Copy link

vmendi commented Jun 28, 2014

Please run the tests in JS too. I've been fighting with #1097 (comment) for a day until I found this. After 2 months of experience with dart + angulardart, we've found that we constantly need to test the JS version because from time to time there are differences, crashes mostly.

BTW, another hard one was this:
http://stackoverflow.com/questions/23856072/dart-nosuchmethoderror-cannot-call-getdata-config-getdata-is-not-a-functi/23890496#23890496

@mvuksano
Copy link
Contributor

We do run tests in JS. Tests are run in dart and JS for both stable and dev
dart SDK.
On 28/06/2014 7:47 PM, "vmendi" [email protected] wrote:

Please run the tests in JS too. I've been fighting with #1097 (comment)
#1097 (comment)
for a day until I found this. After 2 months of experience with dart +
angulardart, we've found that we constantly need to test the JS version
because from time to time there are differences, crashes mostly.

BTW, another hard one was this:

http://stackoverflow.com/questions/23856072/dart-nosuchmethoderror-cannot-call-getdata-config-getdata-is-not-a-functi/23890496#23890496


Reply to this email directly or view it on GitHub
#1103 (comment)
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

5 participants