Repository navigation
Expand file tree
/
Copy pathindex.js
More file actions
48 lines (46 loc) · 1.98 KB
/
Copy pathindex.js
File metadata and controls
48 lines (46 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
it("should not create a context for typeof require", function() {
require("./typeof").should.be.eql("function");
});
it("should answer typeof require correctly", function() {
(typeof require).should.be.eql("function");
});
it("should answer typeof define correctly", function() {
(typeof define).should.be.eql("function");
});
it("should answer typeof require.amd correctly", function() {
(typeof require.amd).should.be.eql("object");
});
it("should answer typeof define.amd correctly", function() {
(typeof define.amd).should.be.eql("object");
});
it("should answer typeof module correctly", function() {
(typeof module).should.be.eql("object");
});
it("should answer typeof exports correctly", function() {
(typeof exports).should.be.eql("object");
});
it("should answer typeof require.include correctly", function() {
(typeof require.include).should.be.eql("function");
});
it("should answer typeof require.ensure correctly", function() {
(typeof require.ensure).should.be.eql("function");
});
it("should answer typeof require.resolve correctly", function() {
(typeof require.resolve).should.be.eql("function");
});
it("should not parse filtered stuff", function() {
if(typeof require != "function") require("fail");
if(typeof require !== "function") require("fail");
if(!(typeof require == "function")) require("fail");
if(!(typeof require === "function")) require("fail");
if(typeof require == "undefined") require = require("fail");
if(typeof require === "undefined") require = require("fail");
if(typeof require.resolve !== "function") require("fail");
if(typeof module == "undefined") module = require("fail");
if(typeof module === "undefined") module = require("fail");
if(typeof module != "object") module = require("fail");
if(typeof exports == "undefined") exports = require("fail");
if(typeof System !== "object") exports = require("fail");
if(typeof require.include !== "function") require.include("fail");
if(typeof require.ensure !== "function") require.ensure(["fail"], function(){});
});