
Security News
ESLint Adds Official Support for Linting HTML
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
github.com/AnthonyCaliendo/flexunit_puremvc_testcase
= PureMvcTestCase
This TestCase class allows testing of PureMVC code through FlexUnit. The style is intended to mirror EventfulTestCase (another extension to FlexUnit).
== Installation
Installation is easy! Just drop the file into an appropriate directory:
PureMvcTestCase.as
into this new directory.You should now be able to import PureMvcTestCase into your test classes.
== How do I use it?
When creating your test class, have it extend PureMvcTestCase.
Here are the methods which are made available:
* expectNotification(notificationName:String)
Sets up the expectation that a notification is sent with the passed name. Can be called multiple times to set the expectation for multiple notifications.
* assertExpectedNotificationsOccurred(userMessage='')
Asserts that all expected notifications were sent. The userMessage parameter indicates an optional message to be prepended for a failure message.
* lastActualNotification
Property which represents the last notification which was sent (the last actual notification).
== Example Test Class
The following is an example of the kind of test you can write:
public class ChuckProxyTest extends PureMvcTestCase { private var chuck:ChuckProxy = new ChuckProxy();
public function testShouldSendFlashNotificationWhenSeeingTerrorist():void
{
var terrorist:Terrorist = new Terrorist();
expectNotification(ApplicationFacade.FLASHED);
chuck.lookAt(terrorist);
// asserts FLASHED notification was sent
assertExpectedNotificationsOccurred();
// asserts notification body was the terrorist
assertEquals(terrorist, lastActualNotification.getBody());
}
}
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.