Giter Club home page Giter Club logo

intern's People

Contributors

aciccarello avatar apsdehal avatar ascorbic avatar bitpshr avatar bryanforbes avatar csnover avatar dependabot[bot] avatar devpaul avatar edhager avatar emkay avatar gitgrimbo avatar inad9300 avatar jacobroufa avatar jason0x43 avatar jonnycornwell avatar jsmike avatar kitsonk avatar liucougar avatar maier49 avatar milesj avatar neonstalwart avatar novemberborn avatar owiber avatar plumlee avatar qjd2413 avatar rhpijnacker avatar rodneyrehm avatar sholladay avatar stdavis avatar vladikoff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

intern's Issues

How to setup dojo dependency?

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?

URI Encoded Config Error

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.

Silent failures when dependencies fail to load

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.

Implement queue to fix deadlock in PromisedWebDriver

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.

Functional test failure crashes intern when running through Grunt

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.

Functional waitForElementByClassName promise fails.

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?

webdriver reporter: invalid element nesting

It appears the webdriver reporter's DOM creation logic may be a bit skewed. For example, I notice the following at the end of the DOM structure generated by running Intern's self-tests using the webdriver reporter (by adding it to the reporters array in selftest.intern.js):

dom

Long-running unit tests will time out Sauce Labs

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.

Ability to test projects that use AMD/RequireJS shim-config

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?

self-tests / console reporter: invalid grouping

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.

console

Does Intern work on non-Dojo projects?

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);
});

beforeEach / afterEach only execute at the current describe/Suite level, not child levels

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!

TypeError when testing dijit widget

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.

TypeError: object is not a function

Hi,

When I run the following file commonJS_code.js

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.

Intern does not support running functional tests with AndroidDriver

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.

Improve testability of functional interface

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).

Support for asynchronous before/after and friends

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.

Make it possible to mock dependencies for tested module

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.

If a functional test fails in a test suite, all the following tests are also reported as failing.

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.

Test sandbox

Provide an opt-in sandbox interface for tests that gives them a fresh window context to do things to.

Improve handling of Sauce Labs hangs

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:

  1. Sauce Connect forcibly closes the socket
  2. The VM just sits there doing nothing until the session times out

Support tests written in CoffeeScript

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

Grunt example tests fail after install...

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...

More meaningful names of "Session" with SauceLabs

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.

ReferenceError: define is not defined

Hi,

When I run the following file HelloWorld.js

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.

PromisedWebDriver does not call element* methods correctly when a context element is stored

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!

Documentation for end() and wait() functions

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.

Add a performance benchmarking API

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.

Tagged download + git submodules

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-comparison is incorrect

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.

CommonJS / Require support

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.

npm installation error

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 ]

geezer branch: `getObjectKeys` inconsistent on older IE's compared to newer

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.

Functional test never failing when calling 'then' twice.

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;
        }
    });

});

Geezer is looking for Chai

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]"...

Passing configuration to reporters or write a custom reporter?

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.