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

qunit-migrate

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qunit-migrate

Migrate old QUnit code to 2.x

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

QUnit Migrate Build Status

Migrate old QUnit code to 2.x

Install

npm install --global qunit-migrate

Usage

qunit-migrate "file1, file2, file3" -d -q -w

-w: If you want to write the output to file, default: false

-d: If you want definitions support, this will try to add QUnit deps to AMD definitions and anonymous requires. Keep in mind, qunit-migrate currently doesn't check if qunit definition is already present or not.

-q: If you want double quoutes support, by default we convert to single quotes

Example:

qunit-migrate tries to change old QUnit code to new QUnit specifications.

For e.g. following code will be converted as follows:

// Taken directly from jquery-globalize
define([
	"cldr",
	"src/core",
	"json!cldr-data/supplemental/likelySubtags.json",
	"cldr/event"
], function( Cldr, Globalize, likelySubtags ) {
Cldr.load( likelySubtags );
module( "Globalize.locale" );
test( "should allow String locale", function() {
	Globalize.locale( "en" );
	ok( Globalize.cldr instanceof Cldr );
	equal( Globalize.cldr.locale, "en" );
});
});

to

// Taken directly from jquery-globalize
define([ 'qunit',
	"cldr",
	"src/core",
	"json!cldr-data/supplemental/likelySubtags.json",
	"cldr/event"
], function( QUnit, Cldr, Globalize, likelySubtags ) {
Cldr.load( likelySubtags );
QUnit.module( "Globalize.locale" );
QUnit.test( "should allow String locale", function( assert ) {
	Globalize.locale( "en" );
	assert.ok( Globalize.cldr instanceof Cldr );
	assert.equal( Globalize.cldr.locale, "en" );
});
});

Keywords

FAQs

Package last updated on 05 Jul 2015

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