diff --git a/tests/ava.js b/tests/ava.js index 7a851ee..8d04d67 100644 --- a/tests/ava.js +++ b/tests/ava.js @@ -5,19 +5,19 @@ test('foo will run', t => { }); test('foo will also run, yet fail', t => { - t.pass("Does that need message?"); + t.fail("Does that need message?"); }); test('foo will run but not exclusively', t => { - t.pass("Babumm"); + t.fail("Babumm"); }); // Won't run, no title -test('some name', function (t) { +test(function (t) { t.pass(); }); // Won't run, no explicit title -test('title', function foo(t) { +test(function foo(t) { t.pass(); }); \ No newline at end of file diff --git a/tests/chai.js b/tests/chai.js index 77f0679..f12c317 100644 --- a/tests/chai.js +++ b/tests/chai.js @@ -3,8 +3,8 @@ var expect = require('chai').expect; var should = require('chai').should(); it('should return true if valid user id', function(){ - expect(true).to.be.true; + expect(true).to.be.false; }); it('should return false if invalid user id', function(){ - expect(42).to.equal(42); + expect(42).to.equal(4); }); \ No newline at end of file diff --git a/tests/qunit-tests.js b/tests/qunit-tests.js index 9abe6ce..96edf05 100644 --- a/tests/qunit-tests.js +++ b/tests/qunit-tests.js @@ -1,13 +1,13 @@ QUnit.test( "hello test", function( assert ) { assert.ok( 3 == "3", "Passed!" ); - assert.ok( 7 == "7", "Passed!" ); + assert.ok( 7 === "7", "Passed!" ); assert.ok( 9 == "9", "Passed!" ); }); QUnit.test( "bye test", function( assert ) { - assert.ok( 1 == "1", "Passed!" ); + assert.ok( 1 === "1", "Passed!" ); assert.ok( 3 == "3", "Passed!" ); - assert.ok( 5 == "5", "Passed!" ); + assert.ok( 5 === "5", "Passed!" ); }); diff --git a/tests/tape.js b/tests/tape.js index 7ca741b..c12a49f 100644 --- a/tests/tape.js +++ b/tests/tape.js @@ -5,14 +5,14 @@ test('timing test', function (t) { t.equal(typeof Date.now, 'function'); var start = Date.now(); - t.equal(1, 1); - t.equal(2, 2); + t.equal(1, 4); + t.equal(2, 4); t.end(); }); test('fail test', (t) => { - t.equal(3,3); + t.equal(2,3); t.end(); }); \ No newline at end of file diff --git a/tests/unit-js.js b/tests/unit-js.js index 27751d8..d0cb409 100644 --- a/tests/unit-js.js +++ b/tests/unit-js.js @@ -20,15 +20,15 @@ describe('Learning by the example', function(){ from: 'France' }; }) - // .then('test the "example" object', function(){ - // test - // .object(example) - // .hasValue('developer') - // .hasProperty('name') - // .hasProperty('from', 'France') - // .contains({message: 'hello world'}) - // ; - // }) + .then('test the "example" object', function(){ + test + .object(example) + .hasValue('developer') + .hasProperty('name') + .hasProperty('from', 'France') + .contains({message: 'hello world'}) + ; + }) .if(example = 'bad value') .error(function(){ example.badMethod(); @@ -37,8 +37,8 @@ describe('Learning by the example', function(){ }); it('other test case', function(){ test.assert(true); - test.assert(true); - test.assert(true); + test.assert(false); + test.assert(false); test.assert(true); }); });