guinness 0.1.18
guinness: ^0.1.18 copied to clipboard
A port of the Jasmine testing framework.
0.1.18 - 2015-11-06 #
- Fix
toHaveSamePropsmatcher to handle the same instance being used multiple times.
0.1.17 - 2015-03-13 #
- Change
toHaveSamePropsmatcher to ignore private fields.
0.1.16 - 2014-10-29 #
-
Add
toHaveSamePropsmatcher.final p1 = new Person("Jim", 25); final p2 = new Person("Jim", 25); expect(p1).not.toEqual(p2); expect(p1).toHaveSameProps(p2);
0.1.15 - 2014-09-04 #
-
The
whereargument totoThrowWithcould be a function returning a boolean:expect(testedClosure).toThrowWith(where: (e) => e is NoSuchMethodError);will pass iff executing the
testClosurethrows aNoSuchMethodErrorexception. -
Spy functions now record named arguments:
final spy = guinness.createSpy(); spy(named: 1); expect(spy.mostRecentCall.namedArguments).toEqual({"named": 1}); -
Support for spy objects has been added:
class SomeSpy extends SpyObject implements SomeInterface {} ... final s = new SomeSpy(); s.invoke(1,2); s.name; s.name = 'some name';
expect(s.spy("invoke")).toHaveBeenCalled(); expect(s.spy("get:name")).toHaveBeenCalled(); expect(s.spy("set:name")).toHaveBeenCalled();
0.1.14 - 2014-08-02 #
- Improve the handling of Shadow DOM. The
toHaveTextmatcher now handles Shadow DOM with multiple insertion points.
0.1.13 - 2014-07-21 #
- Make the syntax more flexible by allowing passing any object as a name (e.g.,
describe(MyClass, (){}). - Fixes a bug that caused some stack traces not to be preserved.
0.1.12 - 2014-07-07 #
- Add support for pending specs.
0.1.11 - 2014-06-27 #
- Add numeric matchers:
toBeLessThan(expected),toBeGreaterThan(expected),toBeCloseTo(expected, precision)- assert than the value is withinexpected ± (10^-precision)/2
0.1.10 - 2014-06-23 #
Handle afterEach blocks that throw.
- When both an
itand anafterEachthrow, the original error thrown by theitblock is returned. - When an
itreturns normally, and anafterEachthrows, the error throw by theafterEachblock is returned.
Add init_specs.dart to improve Karma integration. Since the standard auto initialization of specs does not work with Karma, you had to call guinness.initSpecs() manually.
Now you can just include the init file as follows:
files: [
"test/main1_test.dart",
"test/main2_test.dart",
"packages/guinness/init_specs.dart",
{pattern: '**/*.dart', watched: true, included: false, served: true}
]
0.1.9 - 2014-06-18 #
Add extra information about the test suite.
Example:
guinness.suiteInfo().activeItsPercent
guinness.suiteInfo().exclusiveIts
0.1.8 - 2014-06-11 #
- Update the
toThrowWithmatcher to accept a callback to run custom matchers against the thrown exception - Cleanup
0.1.7 - 2014-06-02 #
- Update the
toThrowWithmatcher to accept a pattern to match the message - Update the
toThrowWithmatcher to accept the expected class of a thrown exception - Add a
toBeAnInstanceOf(type)matcher - Add
toBeTrueandtoBeFalsematchers
The toBeAnInstanceOf matcher and the anInstanceOf parameter have been added because Dart2JS does not fully implement mirrors (in particular, it does not support isSubtypeOf, which is used by toBeA and toThrowWith(type:)). See API docs for more information.
0.1.6 - 2014-05-28 #
- Fix the
toThrowWithmatcher
0.1.5 - 2014-05-27 #
- Update the list of contributors
- Add a
toBeA(type)matcher - Add a
toThrowWith({type, message})matcher - Deprecate the
toThrow()matcher (The API will change to conform withtoThrowWith())
0.1.4 - 2014-05-20 #
- License change
0.1.3 - 2014-05-11 #
- Add support for async
beforeEach,afterEach, anditblocks. - Add stats module. To enable:
guinness.showStats = true;. - Fix:
ddescribedoes not work when using the unittest backend.
0.1.2 - 2014-05-03 #
- Refactor the unittest backend.
- Add more tests for the unittest backend.
0.1.1 - 2014-05-02 #
- Fix type warnings.
0.1.0 - 2014-05-02 #
- Add an optional second argument to
expectto make the unitest-to-guinness transition easier. - Add
Expect#toto run custom matchers. - Change
spyto match the Dart conventions, and enable handling named parameters in the future. - Change the unittest backend to mimic Jasmine semantics (an exclusive
ittakes precedence). - Rename
runTestsintorunSpecs. - Implement auto initialization, so there is no need to call
initSpec. - Split the library into the vm and browser versions.
- Implement new matchers.
#v0.0.1 (2014-04-24)
Initial release.
- Initial implementation of the Jasmine syntax (describe, it, beforeEach, afterEach).
- Initial implementation of matchers.
- Initial implementation of the main configuration object.