This repository has been archived by the owner. It is now read-only.

buster-jstestdriver: assertEquals() works differently #48

Closed
dominykas opened this Issue Jan 2, 2012 · 14 comments

Comments

Projects
None yet
3 participants
@dominykas
Member

dominykas commented Jan 2, 2012

TestCase("assertEquals incompatibility", {

    "test objects should be equal": function()
    {
        assertEquals({"test":123}, {"test":123});
    }

});

In JsTestDriver:
Opera 11.60 Mac OS [PASSED] assertEquals incompatibility.test objects should be equal

In buster:

    AssertError: expected {"test":123} but was {"test":123}

This particular one would let me pass extra ~50 of ~120 tests in one project just like that on both tools.

@augustl

This comment has been minimized.

Member

augustl commented Jan 3, 2012

Thanks. Currently we just blatantly use the buster-assertions asserts based on name. So these kinds of incompabilities were bound to be uncovered sooner or later I guess :)

@cjohansen

This comment has been minimized.

Member

cjohansen commented Jan 3, 2012

Actually, that's not correct. We use JsTestDriver's assertions. @dymonaz what versions of JsTestDriver did you run these with? I'm guessing our Assert.js is too old.

@dominykas

This comment has been minimized.

Member

dominykas commented Jan 3, 2012

I'm using latest JsTestDriver - 1.3.3d, although this was working for the past 3-4 months.

What I find interesting is this:

├─┬ buster@0.3.0
...
├─┬ buster-jstestdriver@0.1.0 
│ └─┬ buster@0.2.4 
@cjohansen

This comment has been minimized.

Member

cjohansen commented Jan 3, 2012

Wtf. I don't understand NPM's dependency resolution... I'll look at it.

@cjohansen

This comment has been minimized.

Member

cjohansen commented Feb 21, 2012

Try again plz? I've updated both buster and buster-jstestdriver:

npm update -g buster
npm install buster-jstestdriYjever

In your configuration extensions: [require("buster-jstestdriver")]. Let me know what happens.

@dominykas

This comment has been minimized.

Member

dominykas commented Feb 22, 2012

Having trouble upgrading - npm lists when@1.0.2 as invalid - don't have time to dig deeper - probably will only test over weekend.

│ ├─┬ buster-test-cli@0.4.4 
...
│ │ ├── rimraf@1.0.9 
│ │ └── when@1.0.2  invalid

Also, just to confirm - should buster-jstestdriver be -g or local?

@cjohansen

This comment has been minimized.

Member

cjohansen commented Feb 22, 2012

Strange. It's a GItHub dependency. buster-jstestdriver can be global or local. I recommend local, as the extension will be a dependency in your project.

@dominykas

This comment has been minimized.

Member

dominykas commented Feb 26, 2012

I don't think that "when" is the problem I'm having... it just says it wants "when" from github v1.0.2 but will use "/node_modules/buster-test-cli/node_modules/when" is v1.0.2 - so it should be just fine.

What bugs me is buster-jstestdriver itself - if I install it globally, then buster test complains that there's no such module. If I install it locally, then I get

Initializing remote runner with 1 slaves {"data":{"name":"UncaughtError","message":"Uncaught ReferenceError: TestCase is not defined"},"topic":"uncaughtException","clientId":"afaafe92-4b5f-4705-bb22-c6501826fe1a","client":{}}

@cjohansen

This comment has been minimized.

Member

cjohansen commented Feb 27, 2012

What does your setup look like? You have extensions: [require("buster-jstestdriver")] in your configuration right?

@dominykas

This comment has been minimized.

Member

dominykas commented Feb 27, 2012

var config = module.exports;

config["buster-jstestdriver-experiments"]={
    environment: "browser",
    sources: [
    ],
    tests: [
        "js/*.js",
    ],
    extensions: [require("buster-jstestdriver")]
}

Did I miss something else?

@cjohansen

This comment has been minimized.

Member

cjohansen commented Feb 27, 2012

@dymonaz Just realized I hadn't pushed my latest updates to NPM. Try updating buster-jstestdriver (0.2.1, depends on buster-html-doc).

@dominykas

This comment has been minimized.

Member

dominykas commented Feb 27, 2012

The original TestCase() is still failing - updates seem to have happened correctly, although buster-jstestdriver only works when installed locally - not sure if it's an npm problem or something else.

On the upside, html-doc seems to be injected, but it looks like there's a problem with attributes - still investigating.

@cjohansen

This comment has been minimized.

Member

cjohansen commented Feb 28, 2012

I updated buster-html-doc in NPM.

@cjohansen

This comment has been minimized.

Member

cjohansen commented Mar 4, 2012

The original error was caused by jstestdriver.jQuery not being available. Fixed in busterjs/buster-jstestdriver@68ea860

@cjohansen cjohansen closed this Mar 4, 2012

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.