forked from jasmine/jasmine
-
Notifications
You must be signed in to change notification settings - Fork 3
The Trace Reporter
BrianGenisio edited this page Apr 4, 2011
·
1 revision
To use Jasmine-Flex with the trace reporter instead of the visual reporter, create a new Flex Air project. Download the JasmineFlex.swc file and put it in your libs folder.
Add your specs using the <script> blocks.
Hook the applicationComplete event and add the TrivialTraceReporter. Tell the reporter to exit the app when it is complete so your app is not sticking around. Execute Jasmine.
Here is an example of what this might look like:
<fx:Script source="spec/SpecHelper.as" />
<fx:Script source="spec/PlayerSpec.as" />
<s:applicationComplete>
jasmine.getEnv().addReporter(new TrivialTraceReporter(function() {exit()}));
jasmine.getEnv().execute();
</s:applicationComplete>Now, run your app in debug mode. Your results will show up in the console window.
As you add new specs to your project, make sure to add spec <script> tags.
