Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
cd4e25e9
Commit
cd4e25e9
authored
Feb 02, 2014
by
Michał Gołębiowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build: Switch to explicit dependencies versions in bower.json
parent
3dccf62c
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
150 additions
and
102 deletions
+150
-102
bower.json
bower.json
+3
-3
require.js
test/libs/require.js
+109
-95
fake_timers.js
test/libs/sinon/fake_timers.js
+38
-4
No files found.
bower.json
View file @
cd4e25e9
...
@@ -16,9 +16,9 @@
...
@@ -16,9 +16,9 @@
"sizzle"
:
"1.10.16"
"sizzle"
:
"1.10.16"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"requirejs"
:
"
~2.1.8
"
,
"requirejs"
:
"
2.1.10
"
,
"qunit"
:
"
~
1.12.0"
,
"qunit"
:
"1.12.0"
,
"sinon"
:
"
~1.7.3
"
"sinon"
:
"
1.8.1
"
},
},
"keywords"
:
[
"keywords"
:
[
"jquery"
,
"jquery"
,
...
...
test/libs/require.js
View file @
cd4e25e9
This diff is collapsed.
Click to expand it.
test/libs/sinon/fake_timers.js
View file @
cd4e25e9
...
@@ -31,6 +31,10 @@ if (typeof sinon == "undefined") {
...
@@ -31,6 +31,10 @@ if (typeof sinon == "undefined") {
throw
new
Error
(
"Function requires at least 1 parameter"
);
throw
new
Error
(
"Function requires at least 1 parameter"
);
}
}
if
(
typeof
args
[
0
]
===
"undefined"
)
{
throw
new
Error
(
"Callback must be provided to timer calls"
);
}
var
toId
=
id
++
;
var
toId
=
id
++
;
var
delay
=
args
[
1
]
||
0
;
var
delay
=
args
[
1
]
||
0
;
...
@@ -132,6 +136,16 @@ if (typeof sinon == "undefined") {
...
@@ -132,6 +136,16 @@ if (typeof sinon == "undefined") {
this
.
clearTimeout
(
timerId
);
this
.
clearTimeout
(
timerId
);
},
},
setImmediate
:
function
setImmediate
(
callback
)
{
var
passThruArgs
=
Array
.
prototype
.
slice
.
call
(
arguments
,
1
);
return
addTimer
.
call
(
this
,
[
callback
,
0
].
concat
(
passThruArgs
),
false
);
},
clearImmediate
:
function
clearImmediate
(
timerId
)
{
this
.
clearTimeout
(
timerId
);
},
tick
:
function
tick
(
ms
)
{
tick
:
function
tick
(
ms
)
{
ms
=
typeof
ms
==
"number"
?
ms
:
parseTime
(
ms
);
ms
=
typeof
ms
==
"number"
?
ms
:
parseTime
(
ms
);
var
tickFrom
=
this
.
now
,
tickTo
=
this
.
now
+
ms
,
previous
=
this
.
now
;
var
tickFrom
=
this
.
now
,
tickTo
=
this
.
now
+
ms
,
previous
=
this
.
now
;
...
@@ -162,7 +176,7 @@ if (typeof sinon == "undefined") {
...
@@ -162,7 +176,7 @@ if (typeof sinon == "undefined") {
},
},
firstTimerInRange
:
function
(
from
,
to
)
{
firstTimerInRange
:
function
(
from
,
to
)
{
var
timer
,
smallest
,
originalTimer
;
var
timer
,
smallest
=
null
,
originalTimer
;
for
(
var
id
in
this
.
timeouts
)
{
for
(
var
id
in
this
.
timeouts
)
{
if
(
this
.
timeouts
.
hasOwnProperty
(
id
))
{
if
(
this
.
timeouts
.
hasOwnProperty
(
id
))
{
...
@@ -170,7 +184,7 @@ if (typeof sinon == "undefined") {
...
@@ -170,7 +184,7 @@ if (typeof sinon == "undefined") {
continue
;
continue
;
}
}
if
(
!
smallest
||
this
.
timeouts
[
id
].
callAt
<
smallest
)
{
if
(
smallest
===
null
||
this
.
timeouts
[
id
].
callAt
<
smallest
)
{
originalTimer
=
this
.
timeouts
[
id
];
originalTimer
=
this
.
timeouts
[
id
];
smallest
=
this
.
timeouts
[
id
].
callAt
;
smallest
=
this
.
timeouts
[
id
].
callAt
;
...
@@ -276,21 +290,39 @@ if (typeof sinon == "undefined") {
...
@@ -276,21 +290,39 @@ if (typeof sinon == "undefined") {
target
.
parse
=
source
.
parse
;
target
.
parse
=
source
.
parse
;
target
.
UTC
=
source
.
UTC
;
target
.
UTC
=
source
.
UTC
;
target
.
prototype
.
toUTCString
=
source
.
prototype
.
toUTCString
;
target
.
prototype
.
toUTCString
=
source
.
prototype
.
toUTCString
;
for
(
var
prop
in
source
)
{
if
(
source
.
hasOwnProperty
(
prop
))
{
target
[
prop
]
=
source
[
prop
];
}
}
return
target
;
return
target
;
}
}
var
methods
=
[
"Date"
,
"setTimeout"
,
"setInterval"
,
var
methods
=
[
"Date"
,
"setTimeout"
,
"setInterval"
,
"clearTimeout"
,
"clearInterval"
];
"clearTimeout"
,
"clearInterval"
];
if
(
typeof
global
.
setImmediate
!==
"undefined"
)
{
methods
.
push
(
"setImmediate"
);
}
if
(
typeof
global
.
clearImmediate
!==
"undefined"
)
{
methods
.
push
(
"clearImmediate"
);
}
function
restore
()
{
function
restore
()
{
var
method
;
var
method
;
for
(
var
i
=
0
,
l
=
this
.
methods
.
length
;
i
<
l
;
i
++
)
{
for
(
var
i
=
0
,
l
=
this
.
methods
.
length
;
i
<
l
;
i
++
)
{
method
=
this
.
methods
[
i
];
method
=
this
.
methods
[
i
];
if
(
global
[
method
].
hadOwnProperty
)
{
if
(
global
[
method
].
hadOwnProperty
)
{
global
[
method
]
=
this
[
"_"
+
method
];
global
[
method
]
=
this
[
"_"
+
method
];
}
else
{
}
else
{
try
{
delete
global
[
method
];
delete
global
[
method
];
}
catch
(
e
)
{}
}
}
}
}
...
@@ -341,11 +373,13 @@ if (typeof sinon == "undefined") {
...
@@ -341,11 +373,13 @@ if (typeof sinon == "undefined") {
sinon
.
timers
=
{
sinon
.
timers
=
{
setTimeout
:
setTimeout
,
setTimeout
:
setTimeout
,
clearTimeout
:
clearTimeout
,
clearTimeout
:
clearTimeout
,
setImmediate
:
(
typeof
setImmediate
!==
"undefined"
?
setImmediate
:
undefined
),
clearImmediate
:
(
typeof
clearImmediate
!==
"undefined"
?
clearImmediate
:
undefined
),
setInterval
:
setInterval
,
setInterval
:
setInterval
,
clearInterval
:
clearInterval
,
clearInterval
:
clearInterval
,
Date
:
Date
Date
:
Date
};
};
if
(
typeof
module
==
"object"
&&
typeof
require
==
"function"
)
{
if
(
typeof
module
!==
'undefined'
&&
module
.
exports
)
{
module
.
exports
=
sinon
;
module
.
exports
=
sinon
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment