You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@dannsam/speclight

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dannsam/speclight

speclight is a simple JavaScript BDD framework for Jasmine

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

speclight is a simple JavaScript BDD framework for Jasmine

Look at the Tests project for examples:

    describe(
	`In order to know how much money I can save
	As a Math Idiot
	I want to add two numbers`,
	() => {
		let a: number;
		let b: number;
		let actual: number;

		given`I enter ${5}`(input => a = input);
		and`I enter ${6}`(input => b = input);
		when`I press add`(() => actual = add(a, b));
		then`The result should be ${11}`(expected => expect(expected).toBe(actual));
    });

/* Output with jasmine-spec-reporter:
  In order to know how much money I can save
        As a Math Idiot
        I want to add two numbers
    √ Given I enter 5
    √  And I enter 6
    √ When I press add
    √ Then The result should be 11
*/

FAQs

Package last updated on 31 Jan 2018

Did you know?

Socket

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.

Install

Related posts