Skip to content

Commit

Permalink
[Tests] add has-strict-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jul 22, 2019
1 parent cc9a91a commit 64ebc6c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 22 deletions.
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,19 @@
"is-string": "^1.0.4"
},
"devDependencies": {
"foreach": "^2.0.5",
"function-bind": "^1.1.0",
"tape": "^4.6.3",
"indexof": "^0.0.1",
"@es-shims/api": "^1.2.0",
"@ljharb/eslint-config": "^8.0.0",
"covert": "^1.1.0",
"eslint": "^3.10.2",
"@ljharb/eslint-config": "^8.0.0",
"semver": "^5.3.0",
"replace": "^0.3.0",
"@es-shims/api": "^1.2.0",
"evalmd": "^0.0.17",
"safe-publish-latest": "^1.1.1"
"foreach": "^2.0.5",
"function-bind": "^1.1.1",
"has-strict-mode": "^1.0.0",
"indexof": "^0.0.1",
"replace": "^0.3.0",
"safe-publish-latest": "^1.1.1",
"semver": "^5.3.0",
"tape": "^4.6.3"
},
"testling": {
"files": [
Expand Down
7 changes: 2 additions & 5 deletions test/implementation.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
var some = require('../implementation');
var bind = require('function-bind');
var test = require('tape');
var runTests = require('./tests');
var hasStrictMode = require('has-strict-mode')();

var hasStrictMode = (function () {
'use strict';
return !this;
}());
var runTests = require('./tests');

test('as a function', function (t) {
t.test('bad array/this value', function (st) {
Expand Down
6 changes: 2 additions & 4 deletions test/shimmed.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ require('../shim')();
var test = require('tape');
var defineProperties = require('define-properties');
var bind = require('function-bind');
var hasStrictMode = require('has-strict-mode')();

var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = function f() {}.name === 'f';
var hasStrictMode = (function () {
'use strict';
return !this;
}());

var runTests = require('./tests');

Expand Down
6 changes: 2 additions & 4 deletions test/tests.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
var hasStrictMode = require('has-strict-mode')();

var global = Function('return this')(); // eslint-disable-line no-new-func
var trueThunk = function () { return true; };
var falseThunk = function () { return false; };

var canDistinguishSparseFromUndefined = 0 in [undefined]; // IE 6 - 8 have a bug where this returns false.
var undefinedIfNoSparseBug = canDistinguishSparseFromUndefined ? undefined : { valueOf: function () { return 0; } };
var hasStrictMode = (function () {
'use strict';
return !this;
}());

var createArrayLikeFromArray = function createArrayLikeFromArray(arr) {
var o = {};
Expand Down

0 comments on commit 64ebc6c

Please sign in to comment.