• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Kocal / dtws-client / 93
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: v0.2.0
DEFAULT BRANCH: master
Ran 06 Sep 2016 11:18PM UTC
Jobs 4
Files 4
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
93

push

travis-ci

Kocal
Test/ES6: separate some tests for not ES6 comptability (READ COMMIT)

When I was writing tests for TornadoWebSocket.Module, I tested the inheritance of this class. 
But I encountered a problem of comptability: for the non ES5, I should use the old method "MyModule = function(TornadoWebSocket.Module){ inherits(MyModule, TornadoWebSocket.Module); function MyModule(prefix) { ... } 
}" with a Babel's method to inherit MyModule with TornadoWebSocket.Module.
It works very fine, but when I was testing MyModule during ES6 tests, I got an error message telling me that I should use the `new` keyword  (during TornadoWebSocket.Module instanciation).
So I tried to use the env' variable called `USE_ES6`, and use the old way when `USE_ES6` is off,  and use `class MyModule extends TornadoWebSocket.Module` when it is on.
But, it didn't works on Travis. When my tests ran on Travis during non ES6 tests (so « old » browsers), the keyword `class` was reserved, and tests failed.

So, I take a decision to implement a ES6 and non ES6 version of some tests (here for tws.Module) in separate files, and use the file `test-main.js` to dynamically load them. 
It works fine, but tests are duplicated, so I will try to find a better and cleaner way to resolve this problem.

174 of 396 relevant lines covered (43.94%)

5.51 hits per line

Jobs
ID Job ID Ran Files Coverage
1 93.1 (BROWSER='Chrome' USE_ES6=false) 06 Sep 2016 11:18PM UTC 0
48.2
Travis Job 93.1
2 93.2 (BROWSER='Chrome' USE_ES6=true) 06 Sep 2016 11:19PM UTC 0
38.51
Travis Job 93.2
4 93.4 (BROWSER='Firefox' USE_ES6=true) 06 Sep 2016 11:18PM UTC 0
38.51
Travis Job 93.4
6 93.6 (BROWSER='Opera' USE_ES6=true) 06 Sep 2016 11:21PM UTC 0
38.51
Travis Job 93.6
Source Files on build 93
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #93
  • 4974c14f on github
  • Prev Build on develop (#92)
  • Next Build on develop (#94)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc