Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
TypeScript and JavaScript testing framework for beautiful and readable tests
Awesomely easy and useful TypeScript and JavaScript testing framework with test cases, compatible with selenium, coverage checkers and TAP reporters.
If you're loving TypeScript then pop on down to our TypeScript Quick Start.
Otherwise if you're more of a JavaScript kinda person, have a gander at our JavaScript Quick Start
Full documentation can be found on our wiki the examples are usually in TypeScript but should be pretty much the same code for JavaScript (just lose the access modifiers and types).
Using a different approach than other JavaScript test frameworks allows us to use more powerful patterns.
// no globals and typing support out of the box with intellisense
import { AsyncTest, Expect, Test, TestCase, TestFixture } from "alsatian";
@TestFixture("whatever you'd like to call the fixture")
export class SetOfTests {
// use the async/await pattern in your tests as you would in your code
@AsyncTest("asychronous test")
public async asyncTest() {
const response = await somethingToHappen();
Expect(response).toBeDefined();
}
// pass arguments into your test functions to keep your test code from being repetative
@TestCase(2, 2, 4)
@TestCase(2, 3, 5)
@TestCase(3, 3, 6)
@Test("addition tests")
public addTest(firstNumber: number, secondNumber: number, expectedSum: number) {
Expect(firstNumber + secondNumber).toBe(expectedSum);
}
}
The key question! Well Alsatian has a lot going for it here are just a few great things to note:
Also it's lightning fast, watch it run all of it's unit tests in super quick time!
So many awesome things!
If at any time things are unclear or you think there may be something going wrong feel free to raise an issue and we'll be glad to get back to you with a solution quickly.
We're always glad to have help out with Alsatian, check out the guidelines
Alsatian has been released under the MIT license
FAQs
TypeScript and JavaScript testing framework for beautiful and readable tests
We found that alsatian demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.