redstone-dart / redstone_mapper

A mapper plugin for Redstone.dart
MIT License
9 stars 10 forks source link

Test transformers for targeting browser #20

Closed sestegra closed 8 years ago

sestegra commented 8 years ago

After trying following commands in order to test browser target, I found issue on type creation.

$ pub serve
$ pub run test --pub-serve=8080 -p chrome

Then, current travis-ci.yml file only targets server mode. How to define tests to target browser mode as well ?

Finally, there is still an issue (only with static mapper), but it's quite difficult to test transformers. Do you have some procedure to debug when pub serve is running ?

00:04 +4 -1: test/client_test.dart: Encode: Mixin                                                  
  Expected: {'id': 'me', 'username': 'Alice', 'password': 'thereisnone'}
    Actual: {}
     Which: has different length and is missing map key 'id'

  package:test                expect
  src/common_tests.dart 65:7  installCommonTests.<fn>.<fn>

00:05 +9 -2: test/client_test.dart: Decode: Mixin                                                  
  Expected: '    id:       me\n'
    '    username: Alice\n'
    '    password: thereisnone'
    Actual: '    id:       null\n'
    '    username: null\n'
    '    password: null'
     Which: is different.
  Expected: ... id:       me\n    us ...
    Actual: ... id:       null\n     ...
                          ^
   Differ at offset 14

  package:test                 expect
  src/common_tests.dart 156:7  installCommonTests.<fn>.<fn>

00:05 +12 -2: Some tests failed.
sestegra commented 8 years ago

Fixes #18

Pacane commented 8 years ago

Thanks!