Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

qunit-decorators

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qunit-decorators

QUnit tests in ES6 and TypeScript via decorators

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
430
decreased by-7.33%
Maintainers
1
Weekly downloads
 
Created
Source

QUnit Decorators

Allow QUnit tests to be written and organized with JavaScript or TypeScript decorators.

Setting this up in your project

npm install --save-dev qunit-decorators

or

yarn add -D qunit-decorators

Writing your tests

When using qunit-decorators, you’ll use classes to describe your modules, and methods for your tests

@module // <-- decorate your modules with @module
class UserLoginTests {
 
  @test // <-- decorate your test methods with @test
	loginWithoutPassword(assert: Assert) {
	   let { result } = loginWithoutPassword(); // the thing being tested
     assert.equal(result, 'ERROR', 'User receives an error'); // ✅
  }

  foo() { } // <-- You're free to put other non-test methods on the class too!
}

(c) 2018

Keywords

FAQs

Package last updated on 21 Jul 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc