Skip to content
This repository was archived by the owner on Oct 27, 2021. It is now read-only.

Latest commit

 

History

History
53 lines (34 loc) · 1.01 KB

File metadata and controls

53 lines (34 loc) · 1.01 KB

should

BDD style assertions for ActionScript 3 and Flex -- test framework agnostic

Example

it(null).should.be.nil();
it(any).should.not.be.nil();
it(any).should.not.be.same_as(nothing);

it(5).should.equal(5);
it(5).should.not.equal(4);
it(5).should.be.greater.than(4);

it([1, 2, 3]).should.be.array.like([1, 2, 3]);
it([1, 2, 3]).should.have.items([2, 3]);

it(true).should.be.kind.of(Boolean);

it({property:any}).should.have.property("property");

var dispatcher:EventDispatcher = new EventDispatcher();
dispatcher.addEventListener("EVENT", function (e:Event):* {});

it(dispatcher).should.have.listener("EVENT");
it(dispatcher).should.not.have.listener("MOUSE_UP");

... and much more

Please see all examples in ItExtensionsTest.as

Syntactic sugar

  • not
  • array
  • objects
  • messages & events

How to build

mvn install

Run tests with IntelliJ IDEA

Test Results

License

New BSD License.