theintern / intern Goto Github PK
View Code? Open in Web Editor NEWA next-generation code testing stack for JavaScript.
Home Page: https://theintern.io/
License: Other
A next-generation code testing stack for JavaScript.
Home Page: https://theintern.io/
License: Other
Unlike in the browser, we should always be able to load instrumented code on Node.js, which would make testing stuff on the server-side much better.
I am writing a small library built on top of dojo and would like to use the intern for testing but it seems like there is a big lack of documentation.
I have a js file like...
define([
"dojo/_base/declare",
"dojo/_base/lang",
"dojo/_base/array",
"dojox/lang/functional/object",
"dojo/topic"
], function(declare, lang, array, object, topic) {
// do stuff
});
and a test like
define([
'intern!bdd',
'intern/chai!assert',
'Quoin/Base'
], function (bdd, assert, QuoinBase) {
with(bdd){
describe('demo', function () {
it('Should load the base', function () {
expect(QuoinBase).to.be('true');
});
});
}
});
But when I run grunt intern
i get the following error...
Warning: Error: Failed to load module dojox/lang/functional/object from /Users/patricklocal/Projects/geoloqi/quoin-js/dojox/lang/functional/object.js (parent: Quoin/Base)
at /Users/patricklocal/Projects/geoloqi/quoin-js/node_modules/intern/node_modules/dojo/dojo.js:742:12
at fs.js:207:20
at Object.oncomplete (fs.js:107:15) Use --force to continue.
It looks like whatever is running the tests cant find dojo. I would have assumed that The Intern would include dojo.
Is there documentation around testing dojo modules and configuring the intern the look at dojo?
I'm attempting to proxy intern tests through our project server to get around cross-origin request issues (per answer here), however Intern URI encodes the config argument when it's sent to Selenium and then loaded by the Dojo loader. This works when going directly through the Intern proxy, but when proxied through Apache first it 404s.
If the config URI is decoded before loaded by the Dojo loader this should work, however. I've tried this on my end, but at the moment I can't push my changes upstream.
Error handling assumes that a reporter has loaded and so when an unhandled error occurs it just publishes an error topic and quits. However, all dependencies including reporters are loaded in one shot within client.js
so if there is an error in a factory function or a missing dependency, Intern will silently quit with no indication of the error after saying Defaulting to "console" reporter
.
PWD deadlocks if you do this:
var remote = this.remote; remote.foo().bar().then(function(){ return remote.baz(); }).blah();
This is because the call to baz
inside the callback is added to the end of the promise chain so it will not execute until after blah
, but the call to blah
will not start until it is resolved.
Documentation is incorrect now with regards to install/usage for 1.1.
I have set up a couple of demo tests that just open Google's homepage and assert the page title. They're running as two separate functional test suites against a local Selenium server. With the correct expected value in the asserts, everything is fine and it reports the console output correctly.
However, if I modify one of the expected values in the asserts to simulate a test failure, Intern crashes out and stops reporting anything when it hits the failure. The test error bubbles up to Grunt, which outputs it as a warning.
If I run Intern from the command-line directly, I get the expected result.
The only options I'm specifying in the grunt config are runType: "runner" and the path to my config file, which is exactly what I'm specifying on the command-line.
I'm writing a basic functional test using Intern, and (I think) I am running into a bug in the promise wrapper.
define([
'intern!object',
'intern/chai!expect',
'require'
], function(registerSuite, expect, require) {
var request,
url = 'https://github.com/theintern/intern';
registerSuite({
name : 'demo',
'submit form' : function() {
return this.remote
.get(require.toUrl('http://google.com'))
.elementById('gbqfq')
.click()
.type('Hello World!')
.end()
.elementById('gbqfb')
.clickElement()
.end()
.waitForElementByClassName('hd')
.text()
.then(function(text) {
expect(text).to.equal('Search Results');
});
}
});
});
The above code fails with:
TypeError: undefined is not a function
at /home/stealth/workspace/memoryleaf/fir/node_modules/intern/node_modules/wd/lib/webdriver.js:1044:9
at /home/stealth/workspace/memoryleaf/fir/node_modules/intern/node_modules/wd/lib/webdriver.js:1024:7
at /home/stealth/workspace/memoryleaf/fir/node_modules/intern/node_modules/wd/lib/webdriver.js:195:5
at /home/stealth/workspace/memoryleaf/fir/node_modules/intern/node_modules/wd/lib/webdriver.js:133:7
at Request._callback (/home/stealth/workspace/memoryleaf/fir/node_modules/intern/node_modules/wd/lib/webdriver.js:332:5)
at Request.self.callback (/home/stealth/workspace/memoryleaf/fir/node_modules/intern/node_modules/wd/node_modules/request/index.js:148:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request.<anonymous> (/home/stealth/workspace/memoryleaf/fir/node_modules/intern/node_modules/wd/node_modules/request/index.js:876:14)
at Request.EventEmitter.emit (events.js:117:20)
at IncomingMessage.<anonymous> (/home/stealth/workspace/memoryleaf/fir/node_modules/intern/node_modules/wd/node_modules/request/index.js:827:12)
However, this code:
define([
'intern!object',
'intern/chai!expect',
'require'
], function(registerSuite, expect, require) {
var request,
url = 'https://github.com/theintern/intern';
registerSuite({
name : 'demo',
'submit form' : function() {
return this.remote
.get(require.toUrl('http://google.com'))
.elementById('gbqfq')
.click()
.type('Hello World!')
.end()
.elementById('gbqfb')
.clickElement()
.end()
.wait(2000)
.elementByClassName('hd')
.text()
.then(function(text) {
expect(text).to.equal('Search Results');
});
}
});
});
Works with no issue.
Looking at the sauce labs output, it appears to find the element and returns it, and then the script crashes. At the crashing point, webdriver.js:1044, the line seems to be trying to call a callback. Is this a bug in intern's promise wrapper?
It can be tedious work with stubbed / mocked functions. Jasmine and others include a spy implementation to make this easier. Chai has a separate plugin for this at https://github.com/chaijs/chai-spies. Rather than making the user pull in this plugin manually, it may be nice to have Intern wrap it, perhaps as a loader plugin similar to the assertion interfaces.
We've discussed this a bit before with @csnover earlier.
Would adding Intern to NPM make the framework easier and more accessible to the users?
Because of the way unit tests work and interact with the test runner (via a back-channel instead of by passing Selenium commands), it’s necessary to send no-op heartbeat commands periodically to avoid Sauce Labs server thinking that the test timed out. Currently this does not happen so if the unit tests take more than 90 seconds (the default timeout interval) the server will terminate.
n.b. There is a way to configure the timeout interval in capabilities; we should respect that configuration and send heartbeats based on the configured interval, if one is set.
Currently it seems it is not possible to set up unit tests for a project that depends on the 'shim'-config for modules that are not AMD. Also mention on SO
Would it be possible to use RequireJS/r.js directly in Intern? Or would this require adding shim support to the Dojo loader? Or is there some other way to enable this?
It looks like the only place that stop is fired is in add and remove inside lib/reporterManager.js, remove is not being fired so stop never gets called from my custom reporter.
I notice that when running intern's self-tests, the console reporter's grouping seems off; lines that should still be grouped under the console suite aren't - they're one or two levels up.
I pointed this out to Colin and he suspects this may actually be an issue due to the tests, rather than the reporter itself.
I am trying to test Intern to see if it would be a good fit for a testing framework. I am trying to test the following code in Intern.
var HelloWorld;
HelloWorld = (function () {
function HelloWorld (name) {
this.name = name || "N/A";
}
HelloWorld.prototype.printHello = function() {
console.log('Hello, ' + this.name);
};
HelloWorld.prototype.changeName = function(name) {
if (name === null || name === undefined) {
throw new Error('Name is required');
}
this.name = name;
};
return HelloWorld;
})();
exports = module.exports = HelloWorld;
The file is located in 'js-test-projects/node/lib/HelloWorld.js' and Intern is located at 'js-test-projects/intern'. I am using the 1.0.0 branch of Intern. Whenever I try to include the file and run the test I don't get any output after "Defaulting to console reporter". Here is the test file.
define([
'intern!tdd',
'intern/chai!assert',
'../lib/HelloWorld'
], function (tdd, assert, HelloWorld) {
console.log(HelloWorld);
});
The implementation on the master branch prevents people from using alternative AMD loaders.
It's quite difficult to arrange setup + teardown behaviour with well-nested describe contexts in Intern: Intern only runs the beforeEach
/afterEach
for tests at the same describe
/Suite level rather than for tests in descendant levels as well.
Other frameworks that offer BDD-interfaces with functions 'beforeEach' / 'afterEach' (e.g. Jasmine, RSpec) run the beforeEach
functions before every test in the same level and all descendant levels.
With beforeEach
not executing code before each and every test, I'm ending up having to construct a hierarchy of nested setup + teardown functions, which is very error-prone. I thought at first this was just my mistake, but having seen that at least Jasmine and RSpec drive beforeEach
as I'd expect, this feels more like an issue in Intern? (I can't find an Intern test that is asserting its current nesting behaviour so I'm not sure it's intended.)
Here's some test code to illustrate in slightly more concrete terms:
define(["intern!bdd", "intern/chai!expect"], function(bdd, expect) {
bdd.describe("Top-level describe", function() {
bdd.before(function() {
console.log("Top-level before");
});
bdd.beforeEach(function() {
console.log("Top-level beforeEach");
});
bdd.after(function() {
console.log("Top-level after");
});
bdd.afterEach(function() {
console.log("Top-level afterEach");
});
bdd.it("Top-level it", function() {
console.log("Top-level it #1");
});
bdd.it("Top-level it", function() {
console.log("Top-level it #2");
});
bdd.describe("Nested describe", function() {
bdd.before(function() {
console.log("Nested-level before");
});
bdd.beforeEach(function() {
console.log("Nested-level beforeEach");
});
bdd.after(function() {
console.log("Nested-level after");
});
bdd.afterEach(function() {
console.log("Nested-level afterEach");
});
bdd.it("Nested-level it", function() {
console.log("Nested-level it #1");
});
bdd.it("Nested-level it", function() {
console.log("Nested-level it #2");
});
});
});
});
I would expect the following output:
Top-level before
Top-level beforeEach
Top-level it #1
PASS: Top-level it (1ms)
Top-level afterEach
Top-level beforeEach
Top-level it #2
PASS: Top-level it (1ms)
Top-level afterEach
Nested-level before
Top-level beforeEach
Nested-level beforeEach
Nested-level it
PASS: Nested-level it
Nested-level afterEach
Top-level afterEach
Top-level beforeEach
Nested-level beforeEach
Nested-level it
PASS: Nested-level it
Nested-level afterEach
Top-level afterEach
Nested-level after
Top-level after
(Not quite sure about some of the detail, but I'm definitely expecting to see the top-level beforeEach
just before each nested-level beforeEach
.)
however Intern 1.1 gives me:
Top-level before
Top-level beforeEach
Top-level it #1
PASS: Top-level it (1ms)
Top-level afterEach
Top-level beforeEach
Top-level it #2
PASS: Top-level it (1ms)
Top-level afterEach
Top-level beforeEach
Nested-level before
Nested-level beforeEach
Nested-level it
PASS: Nested-level it
Nested-level afterEach
Nested-level beforeEach
Nested-level it
PASS: Nested-level it
Nested-level afterEach
Nested-level after
Top-level afterEach
Top-level after
There's a good sample of RSpec behaviour described here: http://www.wulftone.com/2012/01/22/rspec-gotchas-before-after-all-and-each/
And another page which describes the usefulness of per-test beforeEach functions in Jasmine here: http://thatextramile.be/blog/2011/08/take-advantage-of-your-bdd-framework/
Thanks!
Hi,
when I require 'dijit/form/Button' I get following log messages in the browser:
Uncaught TypeError: Object function (a1, a2) {
return contextRequire(a1, a2, module);
} has no method 'on'
StackTrace:
(anonymous function) ready.js:48
execModule dojo.js:512
(anonymous function) dojo.js:501
execModule dojo.js:496
(anonymous function) dojo.js:501
execModule dojo.js:496
(anonymous function) dojo.js:501
execModule dojo.js:496
checkComplete dojo.js:579
guardCheckComplete dojo.js:563
checkComplete dojo.js:571
onLoadCallback dojo.js:653
handler
I run the test in the browser via intern/client.html
. When I try to require a module which following Code
define(["dojo/_base/declare", "dijit/_WidgetBase"], function(declare, _WidgetBase) {
return declare([_WidgetBase], {
startup: function() {}
});
});
I get a this error
Circular dependency: *5 -> dashboard/tests/foo -> dashboard/widgets/project/ScmLog -> dijit/_WidgetBase -> dojo/dom-attr -> dojo/dom-prop -> dojo/dom-construct -> dojo/dom-attr
before the TypeError. I use dojo/dijit 1.8.3 installed with bower.
Hi,
define([
'intern!object',
'intern/chai!assert',
'intern/node_modules/dojo/node!path'
], function (registerSuite, assert, path) {
registerSuite({
name: 'path',
'basic tests': function () {
path.join('a', 'b') }
});
}(this));
then, i got error => TypeError: object is not a function
so, please help me to resolve this error.
I thought it was due to the following issue with wd: admc/wd#129 , but this is not the case (applying the workaround for the issue in wd does not resolve the problem in intern).
It appears that the following line of code in lib/wd.js fails the execution of a test suite:
this._wd.execute('return typeof __internCoverage !== "undefined" && JSON.stringify(__internCoverage)', function (error, returnValue) {
if (error) {
dfd.reject(error);
return;
}
// returnValue might be falsy on a page with no coverage data, so don't try to publish coverage
// results to prevent things from breaking
returnValue && topic.publish('/coverage', self.sessionId, JSON.parse(returnValue));
wrappedFunction.apply(self, args).then(dfd.resolve.bind(dfd), dfd.reject.bind(dfd));
});
The execution of 'return typeof __internCoverage !== "undefined" && JSON.stringify(__internCoverage)' always fails with AdnroidDriver (https://code.google.com/p/selenium/wiki/AndroidDriver).
As a result, the runner.js execution hang foerever, an no error message is displayed in the console.
Producing TAP output on console.log
or process.stdout
would enable support for https://ci.testling.com/.
Currently, we have to set the devDependencies
version of Intern to the current branch itself instead of a known-good version because the functional test interface isn’t properly encapsulated for testing. Either everyone needs to be OK with this because it’s exceptional (i.e. end-users will never experience this issue), or we need to make the functional interface more testable (which is probably a good idea from a code maintainability standpoint anyway).
I have some async setup code I need to run before each test. Is this supported in Intern? If so, how do I go about it?
I tried calling this.async
in beforeEach
, but it is not available. I also tried returning a Deferred
, but this had no effect.
As mentioned in this SO it should be possible to mock out dependencies of the module I wanna test. In a requireJs environment you can create a context for every define
call and map the dependency to a mocked implantation using map
.
Building a code coverage tool is not trivial. If http://theintern.io/ mentions projects like Grunt, Chai, and Promises, it would be fair to also give a shout out to Istanbul.
/cc @gotwarlost
Here is a simple test suite that demonstrate the problem:
define(["intern!object",
"intern/chai!assert"
], function(registerSuite, assert){
registerSuite({
name: "sample test suite",
"failing test": function(){
console.log('Running first test');
return this.remote.get("http://www.google.com")
.then(function(){
assert.fail(false, true, 'test failed');
});
},
"ok test": function(){
console.log('Running second test');
return this.remote.get("http://www.google.com");
},
});
});
If you run it, both tests are reported as failing while only the first one should.
Note that if you run instead the following suite:
define(["intern!object",
"intern/chai!assert"
], function(registerSuite, assert){
registerSuite({
name: "sample test suite",
"failing test": function(){
console.log('Running first test');
return this.remote.get("http://www.google.com");
},
"ok test": function(){
console.log('Running second test');
return this.remote.get("http://www.google.com");
},
});
});
both tests are reported ok.
Provide an opt-in sandbox interface for tests that gives them a fresh window context to do things to.
There doesn't appear to be any way to handle non-AMD dependencies (i.e. jQuery plugins) in Intern, since the AMD shim configuration isn't supported by the Dojo loader (https://github.com/csnover/dojo2-core/issues/9).
I'm winding up with jQuery plugins that are not loaded correctly because they're loaded before jQuery.
For whatever reason, Sauce Labs VMs sometimes manage to get stuck, and then session times out but we aren’t aware of it because there is no error notification. We need to implement a hang detection and retry mechanism. There are at least two conditions:
By spec Array#indexOf
should skip holes in arrays. The current fallback will treat holes in arrays as undefined
instead.
Hey everybody,
it would be awesome to support tests written in CoffeeScript as well, using the CoffeeScript loader plugin.
As a workaround, we can compile the tests to JS before running them, but that's obviously not so nice :)
Greets,
Sebastian
After downloading the grunt example I've run the following commands to set everything up...
npm uninstall -g grunt
npm install -g grunt-cli
git clone https://github.com/theintern/intern-examples.git
cd intern-examples/grunt-example
git clone --recursive https://github.com/theintern/intern.git
cd intern
npm install --production
cd ../..
grunt
Then I get the following unexpected errors:
/src/intern-examples/grunt-example/tests ♨ grunt
Running "intern:client" (intern) task
Defaulting to "console" reporter
Warning: FAIL: main - add - #addItems (1ms)
Error: Set is not defined
ReferenceError: Set is not defined
at new MiniSet (/src/intern-examples/grunt-example/app/MiniSet.js:3:19)
at Test.test (/src/intern-examples/grunt-example/tests/lib/add.js:12:16)
at Test.run (/src/intern-examples/grunt-example/intern/lib/Test.js:154:19)
at /src/intern-examples/grunt-example/intern/lib/Suite.js:163:13
at signalListener (/src/intern-examples/grunt-example/intern/dojo/Deferred.js:37:21)
at Promise.then.promise.then (/src/intern-examples/grunt-example/intern/dojo/Deferred.js:258:5)
at /src/intern-examples/grunt-example/intern/lib/Suite.js:162:26
at process._tickCallback (node.js:415:13)
0/1 tests passed
FAIL: main - get - #getSize (0ms)
Error: Set is not defined
ReferenceError: Set is not defined
at new MiniSet (/src/intern-examples/grunt-example/app/MiniSet.js:3:19)
at Test.test (/src/intern-examples/grunt-example/tests/lib/get.js:10:16)
at Test.run (/src/intern-examples/grunt-example/intern/lib/Test.js:154:19)
at /src/intern-examples/grunt-example/intern/lib/Suite.js:163:13
at signalListener (/src/intern-examples/grunt-example/intern/dojo/Deferred.js:37:21)
at Promise.then.promise.then (/src/intern-examples/grunt-example/intern/dojo/Deferred.js:258:5)
at /src/intern-examples/grunt-example/intern/lib/Suite.js:162:26
at process._tickCallback (node.js:415:13)
FAIL: main - get - #getSizewithItems (0ms)
Error: Set is not defined
ReferenceError: Set is not defined
at new MiniSet (/src/intern-examples/grunt-example/app/MiniSet.js:3:19)
at Test.test (/src/intern-examples/grunt-example/tests/lib/get.js:16:16)
at Test.run (/src/intern-examples/grunt-example/intern/lib/Test.js:154:19)
at /src/intern-examples/grunt-example/intern/lib/Suite.js:163:13
at signalListener (/src/intern-examples/grunt-example/intern/dojo/Deferred.js:37:21)
at Promise.then.promise.then (/src/intern-examples/grunt-example/intern/dojo/Deferred.js:258:5)
at /src/intern-examples/grunt-example/intern/lib/Suite.js:162:26
at process._tickCallback (node.js:415:13)
0/2 tests passed
0/3 tests passed Use --force to continue.
Aborted due to warnings.
Any clue what I can do to fix this? I would expect a default install of the examples project to have working tests...
It would be useful to have something more meaningful passed to SauceLabs when using the Intern to run functional tests. Currently is always displays unnamed job
. It might be useful to provide the root MID that is being executed.
Hi,
define([
'intern!tdd',
'intern/chai!assert',
// 'intern/dojo/node_modules!./node_modules/lib/HelloWorld.js'
], function (tdd, assert, HelloWorld) {
console.log(HelloWorld);
});
then, i got error => ReferenceError: define is not defined
command-line : node tests/HelloWord.js config=tests/intern
so, please help me to solve this error.
I have been having a hard time figuring out how to get chained functions to work.
The webdriver succesfully types user in the "login" element, but throws an error when it gets to the second elementByName.
var browser = this.remote;
return browser.get(loginUrl)
.elementByName("login").clickElement().type("user")
.wait(1000)
.elementByName("password").clickElement().type("password");
Error:
node_modules/intern/node_modules/wd/lib/webdriver.js:166
if(err) {return cb(err);}
^
TypeError: string is not a function
Am I doing something wrong or is this a bug?
Thank you!
I couldn't seem to find documentation on what the end() and wait() functions actually do. They are used in writing functional tests. I managed to find some explanation on a separate page, but I think it would be useful to add this into the wiki under the "functional tests" section, especially since they are custom functions that aren't documented on the wd.js page linked to in the documentation.
intern should include a performance/benchmarking API alongside the functional and unit test functionality. I will re-submit (eventually) my integration of Benchmark.js to provide this API.
I am not a fan of git submodules. One of the many reasons is that they don't get bundled in the ZIP/TARs for tagged releases on Github. I downloaded the ZIP of 1.0 to double check and it seems that dojo and chai are empty directories.
Buster.JS has "Stand-alone browser support": docs.busterjs.org/en/latest/browser-testing/#using-an-html-scaffold
What you call "TDD", Buster calls "xUnit". Buster supports both "TDD"/"xUnit" and "BDD" style tests.
Buster's async support works with either callbacks or promises.
There's a "non-AMD" support issue (#29) which asks about browser style code. In addition, the ability to test CommonJS code or code which uses require("foo") would be excellent too.
As discussed, certain configuration options should probably have default values per https://github.com/theintern/intern/wiki/Configuring-Intern.
After an initial glance, we need to take care of proxyUrl
, proxyPort
, capabilities
, and webdriver
, though there may be more.
npm install intern
errors out every time.
227 warn `git config --get remote.origin.url` returned wrong result (https://github.com/csnover/dojo2-core.git)
228 error git clone https://github.com/csnover/dojo2-core.git Cloning into bare repository 'C:\Users\jfreeman\AppData\Roaming\npm-cache\_git-remotes\https-github-com-csnover-dojo2-core-git-b4e5b8be'...
228 error git clone https://github.com/csnover/dojo2-core.git
228 error git clone https://github.com/csnover/dojo2-core.git warning: templates not found /share/git-core/templates
228 error git clone https://github.com/csnover/dojo2-core.git fatal: Unable to find remote helper for 'https'
229 silly lockFile b4e5b8be-ithub-com-csnover-dojo2-core-git https://github.com/csnover/dojo2-core.git
230 verbose about to build C:\xampp\htdocs\foo\node_modules\intern
231 info C:\xampp\htdocs\foo\node_modules\intern unbuild
232 verbose from cache C:\xampp\htdocs\foo\node_modules\intern\package.json
233 info preuninstall [email protected]
234 info uninstall [email protected]
235 verbose true,C:\xampp\htdocs\foo\node_modules,C:\xampp\htdocs\foo\node_modules unbuild [email protected]
236 info postuninstall [email protected]
237 error Error: Command failed: warning: templates not found /share/git-core/templates
237 error fatal: Unable to find remote helper for 'https'
237 error
237 error at ChildProcess.exithandler (child_process.js:637:15)
237 error at ChildProcess.EventEmitter.emit (events.js:98:17)
237 error at maybeClose (child_process.js:735:16)
237 error at Process.ChildProcess._handle.onexit (child_process.js:802:5)
238 error If you need help, you may report this log at:
238 error <http://github.com/isaacs/npm/issues>
238 error or email it to:
238 error <[email protected]>
239 error System Windows_NT 6.2.9200
240 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "intern"
241 error cwd C:\xampp\htdocs\foo
242 error node -v v0.10.10
243 error npm -v 1.2.25
244 error code 128
245 verbose exit [ 1, true ]
IE < 9 has the [[DontEnum]]
bug, that means that iteration over objects will skip own properties like toString
on objects (because they shadow non-enumerable Object.prototype
properties). Libs like es5-shim, Dojo, Lo-Dash, Prototype, MooTools, and YUI workaround this. There are also inconsistencies when iterating functions as Safari 5 (and some others) will incorrectly iterate over the prototype
property.
The following functional test is not failing, while it is supposed to:
define(["intern!object",
"intern/chai!assert"
], function(registerSuite, assert){
registerSuite({
name: "Simple test suite",
"simple test": function(){
var browser = this.remote;
browser.get('http://www.google.com')
// Check if the browser is running on a touch device
.eval('"ontouchstart" in document || window.navigator.msMaxTouchPoints > 0').then(function(hasTouch){
console.log("hasTouch: " + hasTouch);
if (hasTouch) {
assert.fail(true, false, "touch device support not yet implemented in the test");
} else {
browser.elementByName('btnI')
.clickElement()
.end()
.waitForElementById('top-content', 5000)
.elementById('top-content')
.text().then(function(text) {
console.log("TEXT: " + text);
assert.equal('this assert is going to fail', text, 'test is failing as expected');
// PROBLEM: the test is not failing as expected...
});
}
});
return browser;
}
});
});
Trying to run the 1.1.0-geezer version with PhantomJS I get an error that "chai.js" is not found in the "intern" directory.
I cloned the repo and checked out the tag "1.1.0-geezer". Then from the intern-tutorial root I did npm install ./intern/
.
npm list
returns "[email protected]"...
I'd like to generate cobertura reports from Istanbul but having scanned through the code Intern calls istanbul/lib/report/lcovonly
It's easy enough to write a custom reporter so this is just a general question, should the lcov reporter allow for configuration? Otherwise the wiki should probably make it clearer it's a good case for custom reporters
Hi, I'm trying to run the example tests listed in https://github.com/theintern/intern/wiki/Writing-Tests but in every test there's a dependency I can't find anywhere
'../Request'
is this something included in an external package?
Testling-CI is a pretty neat thing for cross-browser testing, and it would be great if Intern could support it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.