Giter Club home page Giter Club logo

jsunit's Introduction

JsUnit

Copyright (c) 2012 Pivotal Labs.
This software is licensed under the MIT License.

JsUnit is no longer maintained by Pivotal Labs or its original author. Pivotal Labs recommends Jasmine (http://pivotal.github.com/jasmine/) for Javascript testing.

jsunit's People

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

jsunit's Issues

JsUnit 2.2 not working with IE 8

I reported this previously, but thought I'd give the new 2.2 release a try. Still not working with IE 8. It runs, and if all tests pass things are OK. If any test fails IE always reports "Object doesn't support this property or method". Not helpful. I believe this has to do with the way JsUnit throws exceptions to collect failures. IE 8 seems to have changed its exception handling where exceptions cannot be throw across frames.

In the meantime I've been playing with JSpec, and having success with that in IE 8.

objectEquals and other with undefined

Code


assertObjectEquals(
    'Why this works?',
    {},
    {'hey': 1}
);

assertObjectEquals(
    'And this too???',
    {'hop': 3},
    {'hey': 1}
);

assertObjectEquals(
    'Only here we are normally stop.',
    {'hey': 2},
    {'hey': 1}
);

JsUnit 2.2

User-agents

  • Running on Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.15) Gecko/2009101601 Firefox/3.0.15
  • Running on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.33 Safari/530.5
  • Running on Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

Date objects equality assertion

version 2.2, in jsUnitCore.js, assertObjectEquals(date1, date2) failed to compare two equivalent Date objects.

The cause is in the same file,
JsUnit.PRIMITIVE_EQUALITY_PREDICATES

A quick solution follows.

  1. Add the following:
    JsUnit.DATE_EQUALITY_PREDICATE = function(var1, var2) {
    return var1.valueOf() === var2.valueOf();
    };
  2. Modify the following line
    'Date': JsUnit.TRIPLE_EQUALITY_PREDICATE,
    to the following line
    'Date': JsUnit.DATE_EQUALITY_PREDICATE,

Please review the solution.

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.