New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

can-type

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-type - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

32

can-type-test.js

@@ -7,19 +7,21 @@ var canReflect = require("can-reflect");

function equal(result, expected) {
QUnit.equal(expected, result, "Result matches expected");
function equal(assert, result, expected) {
assert.equal(expected, result, "Result matches expected");
}
function strictEqual(result, expected) {
QUnit.strictEqual(expected, result, "Result matches expected strictly");
function strictEqual(assert, result, expected) {
assert.strictEqual(expected, result, "Result matches expected strictly");
}
function isNaN(result) {
QUnit.assert.ok(Number.isNaN(result), "Is NaN value");
function isNaN(assert, result) {
assert.ok(Number.isNaN(result), "Is NaN value");
}
function ok(reason) {
QUnit.assert.ok(true, reason || "Expected to throw");
function ok(assert, reason) {
assert.ok(true, reason || "Expected to throw");
}
var throwsBecauseOfWrongType = ok.bind(null, "Throws when the wrong type is provided");
function throwsBecauseOfWrongType(assert) {
ok(assert, "Throws when the wrong type is provided");
}

@@ -31,4 +33,4 @@ var checkIsNaN = {

var checkDateMatchesNumber = {
check: function(date, num) {
QUnit.assert.strictEqual(date.getTime(), num, "Converted number to date");
check: function(assert, date, num) {
assert.strictEqual(date.getTime(), num, "Converted number to date");
}

@@ -87,3 +89,3 @@ };

QUnit.test(testName, function() {
QUnit.test(testName, function(assert) {
var TypeDefinition = type[methodName](Type);

@@ -95,9 +97,9 @@

if(testCase[methodName] && testCase[methodName].check) {
testCase[methodName].check(result, value);
testCase[methodName].check(assert, result, value);
} else {
definition.check(result, value);
definition.check(assert, result, value);
}
} catch(err) {
if(definition.throws) {
definition.throws(value, err);
definition.throws(assert);
} else {

@@ -104,0 +106,0 @@ throw err;

{
"name": "can-type",
"version": "0.1.7",
"version": "0.1.8",
"description": "Type definitions",

@@ -17,3 +17,2 @@ "homepage": "https://canjs.com/doc/can-type.html",

"preversion": "npm test",
"version": "git commit -am \"Update version number\"",
"postpublish": "git push --tags && git push",

@@ -25,4 +24,3 @@ "testee": "testee test.html --browsers firefox",

"release:minor": "npm version minor && npm publish",
"release:major": "npm version major && npm publish",
"develop": "done-serve --static --develop --port 8080"
"release:major": "npm version major && npm publish"
},

@@ -32,3 +30,2 @@ "main": "can-type.js",

"canjs",
"donejs-plugin",
"types"

@@ -42,10 +39,7 @@ ],

"steal": "^2.1.6",
"steal-qunit": "^1.0.1",
"steal-qunit": "^2.0.0",
"steal-tools": "^2.0.9",
"testee": "^0.8.1",
"generator-donejs": "^3.0.0",
"donejs-cli": "^3.0.0-pre.5",
"done-serve": "^3.0.0"
"testee": "^0.9.1"
},
"license": "MIT"
}
# can-type
[![Build Status](https://travis-ci.org/DoneJS/can-type.svg?branch=master)](https://travis-ci.org/DoneJS/can-type)
[![Build Status](https://travis-ci.org/DoneJS/can-type.svg?branch=master)](https://travis-ci.org/DoneJS/can-type) [![Greenkeeper badge](https://badges.greenkeeper.io/canjs/can-type.svg)](https://greenkeeper.io/)

@@ -5,0 +5,0 @@ Type definitions

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