bitovi / bitovi/testee

Test is hung in the middle

Open
#96 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
119
Forks
23
PR merge metrics
No merged PRs in 30d

Description

## Environment
node: v4.5.0
npm: 2.15.9
testee: 0.2.5
phantomjs: 2.1.1

```js
// adder.js
import Component from 'can/component/';
import Map from 'can/map/';
import 'can/map/define/';
import './adder.less!';
import template from './adder.stache!';

export const ViewModel = Map.extend({
a: 0,
b: 0,
define: {
result: {
get() {
return this.attr('a') + this.attr('b');
}
}
}
});

export default Component.extend({
tag: 'adder',
viewModel: ViewModel,
template
});
```

```js
import QUnit from 'steal-qunit';
import can from 'can';
import stache from 'can/view/stache/';
import F from 'funcunit';
import $ from 'jquery';
import './adder';

// ViewModel unit tests
QUnit.module('apoc/components/adder');

QUnit.test('Has added number', function() {
const mock = {
a: 2,
b: 3
};
const template = stache('');

$('#qunit-fixture').html(template(mock));
this.$component = F('#qunit-fixture').find('adder');
this.vm = can.viewModel(this.$component);
console.log(this.vm);

equal(this.vm.attr('result'), 5);
});
```

## log from `DEBUG:testee` command with `phantom` browser
```sh
testee:main running test for [ 'test/test.html' ] [ 'phantom' ] {} +0ms
testee:main bootstrapping Testee +10ms
testee:main starting Testee server { port: 3996,
root: '/Users/mshin/Workspace/spirent/apoc',
reporter: 'Dot',
adapter: '/testee/',
timeout: 120,
delay: 1000,
tunnel: { type: 'local', port: 3996 },
launch: { type: 'local' } } +1ms
testee:server initializing Feathers API +2ms
testee:hosting intializing static file server /Users/mshin/Workspace/spirent/apoc +15ms
testee:main testee server started and listening +22ms
testee:main hooking up services to Mocha reporter +0ms
testee:reporter setting up Mocha command line reporter +0ms
testee:reporter start +1ms

testee:main starting up localhost tunnel { type: 'local', port: 3996 } +0ms
testee:main localhost tunnel started on http://localhost:3996 +1ms
testee:main using browser launcher local { type: 'local' } +0ms
testee:main browser launcher initialized +0ms
testee:main setting up test runner +0ms
testee:main server bootstrapped, running tests. +1ms
testee:runner running tests for [ 'test/test.html' ] [ 'phantom' ] +0ms
testee:runner initializing sequential test runs for browser phantom +0ms
testee:runner running individual test http://localhost:3996/test/test.html?__token=5k2emi { browser: 'phantom' } +2ms
testee:runner browser instance started { browser: 'phantom' } +28ms
testee:runner tracking test run http://localhost:3996/test/test.html?__token=5k2emi { browser: 'phantom' } +0ms
testee:html-injector injecting scripts into file /test/test.html?__token=5k2emi +504ms
testee:runner CONSOLE: [object Object]
http://localhost:3996/test/test.html?__token=5k2emi { browser: 'phantom' } +1s
```

## log from `DEBUG:testee` command with `firefox` browser
```sh
testee:main running test for [ 'test/test.html' ] [ 'firefox' ] { browsers: 'firefox' } +0ms
testee:main bootstrapping Testee +20ms
testee:main starting Testee server { browsers: 'firefox',
port: 3996,
root: '/Users/mshin/Workspace/spirent/apoc',
reporter: 'Dot',
adapter: '/testee/',
timeout: 120,
delay: 1000,
tunnel: { type: 'local', port: 3996 },
launch: { type: 'local' } } +1ms
testee:server initializing Feathers API +1ms
testee:hosting intializing static file server /Users/mshin/Workspace/spirent/apoc +12ms
testee:main testee server started and listening +16ms
testee:main hooking up services to Mocha reporter +0ms
testee:reporter setting up Mocha command line reporter +1ms
testee:reporter start +0ms

testee:main starting up localhost tunnel { type: 'local', port: 3996 } +0ms
testee:main localhost tunnel started on http://localhost:3996 +1ms
testee:main using browser launcher local { type: 'local' } +0ms
testee:main browser launcher initialized +1ms
testee:main setting up test runner +0ms
testee:main server bootstrapped, running tests. +0ms
testee:runner running tests for [ 'test/test.html' ] [ 'firefox' ] +0ms
testee:runner initializing sequential test runs for browser firefox +0ms
testee:runner running individual test http://localhost:3996/test/test.html?__token=b7g71d { browser: 'firefox' } +2ms
testee:runner browser instance started { browser: 'firefox' } +49ms
testee:runner tracking test run http://localhost:3996/test/test.html?__token=b7g71d { browser: 'firefox' } +0ms
testee:html-injector injecting scripts into file /test/test.html?__token=b7g71d +1s
testee:html-injector injecting scripts into file /favicon.ico +292ms
testee:reporter starting run { status: 'running',
file: 'http://localhost:3996/test/test.html?__token=b7g71d',
id: 'a26d215ef30a56394074b87a43a3ec1b',
environment: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:50.0) Gecko/20100101 Firefox/50.0',
runner: 'QUnit',
time: 1479931070826 } +1s
testee:runner checking if browser timeout can be reset http://localhost:3996/test/test.html?__token=b7g71d true +9ms
testee:reporter starting suite { status: 'running',
file: 'http://localhost:3996/test/test.html?__token=b7g71d',
title: 'apoc tests',
root: true,
id: 'd33df44d4c08ad6bdb371ab2c737337c',
parent: 'a26d215ef30a56394074b87a43a3ec1b' } +63ms
testee:reporter starting suite { status: 'running',
file: 'http://localhost:3996/test/test.html?__token=b7g71d',
title: 'apoc/components/adder',
parent: 'd33df44d4c08ad6bdb371ab2c737337c',
id: '2ba96d5c24f28e2b2fc70b5ffde4a211' } +8ms
testee:reporter starting suite { status: 'running',
file: 'http://localhost:3996/test/test.html?__token=b7g71d',
title: 'Has added number',
parent: '2ba96d5c24f28e2b2fc70b5ffde4a211',
id: '7ffcd5828adb259f18031510347868d2' } +2ms
testee:reporter starting test { file: 'http://localhost:3996/test/test.html?__token=b7g71d',
id: '1d48565b36709004587aca01a5185894',
title: 'okay',
parent: '7ffcd5828adb259f18031510347868d2' } +2ms
testee:reporter updating test { file: 'http://localhost:3996/test/test.html?__token=b7g71d',
id: '1d48565b36709004587aca01a5185894',
title: 'okay',
parent: '7ffcd5828adb259f18031510347868d2',
status: 'passed' } +2ms

․ testee:reporter updating suite { status: 'finished',
file: 'http://localhost:3996/test/test.html?__token=b7g71d',
title: 'Has added number',
parent: '2ba96d5c24f28e2b2fc70b5ffde4a211',
id: '7ffcd5828adb259f18031510347868d2' } +11ms
testee:reporter updating suite { status: 'finished',
file: 'http://localhost:3996/test/test.html?__token=b7g71d',
title: 'apoc/components/adder',
parent: 'd33df44d4c08ad6bdb371ab2c737337c',
id: '2ba96d5c24f28e2b2fc70b5ffde4a211',
failed: 0,
total: 1 } +11ms
testee:reporter updating suite { status: 'finished',
file: 'http://localhost:3996/test/test.html?__token=b7g71d',
title: 'apoc tests',
root: true,
id: 'd33df44d4c08ad6bdb371ab2c737337c',
parent: 'a26d215ef30a56394074b87a43a3ec1b' } +6ms
testee:reporter updating run { status: 'finished',
file: 'http://localhost:3996/test/test.html?__token=b7g71d',
id: 'a26d215ef30a56394074b87a43a3ec1b',
environment: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:50.0) Gecko/20100101 Firefox/50.0',
runner: 'QUnit',
time: 1479931070826,
failed: 0,
passed: 1,
total: 1,
runtime: 118 } +4ms
testee:runner checking if run http://localhost:3996/test/test.html?__token=b7g71d is finished true +1ms
testee:runner stopping browser instance { browser: 'firefox' } +1ms
testee:main shutting down reporter +705ms
testee:reporter end +0ms
testee:reporter reportErrors 0 +0ms

1 passing (4s)

testee:main closing server +3ms
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.