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
ee9192d1
Commit
ee9192d1
authored
Nov 12, 2009
by
Robert Katic
Committed by
John Resig
Nov 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected some minor errors made by me (rkatic) in last commits.
parent
7b26e3bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
core.js
test/unit/core.js
+3
-3
No files found.
test/unit/core.js
View file @
ee9192d1
...
...
@@ -517,7 +517,7 @@ test("jQuery.merge()", function() {
});
test
(
"jQuery.extend(Object, Object)"
,
function
()
{
expect
(
2
4
);
expect
(
2
5
);
var
settings
=
{
xnumber1
:
5
,
xnumber2
:
7
,
xstring1
:
"peter"
,
xstring2
:
"pan"
},
options
=
{
xnumber2
:
1
,
xstring2
:
"x"
,
xxx
:
"newstring"
},
...
...
@@ -557,13 +557,13 @@ test("jQuery.extend(Object, Object)", function() {
var
optionsWithCustomObject
=
{
foo
:
{
date
:
new
customObject
}
};
empty
=
{};
jQuery
.
extend
(
true
,
empty
,
optionsWithCustomObject
);
ok
(
empty
.
foo
&&
empty
.
foo
.
date
&&
empty
.
foo
.
date
===
customObject
,
"Custom objects copy correctly (no methods)"
);
ok
(
empty
.
foo
&&
empty
.
foo
.
date
===
customObject
,
"Custom objects copy correctly (no methods)"
);
// Makes the class a little more realistic
myKlass
.
prototype
=
{
someMethod
:
function
(){}
};
empty
=
{};
jQuery
.
extend
(
true
,
empty
,
optionsWithCustomObject
);
ok
(
empty
.
foo
&&
empty
.
foo
.
date
&&
empty
.
foo
.
date
===
customObject
,
"Custom objects copy correctly"
);
ok
(
empty
.
foo
&&
empty
.
foo
.
date
===
customObject
,
"Custom objects copy correctly"
);
var
ret
=
jQuery
.
extend
(
true
,
{
foo
:
4
},
{
foo
:
new
Number
(
5
)
}
);
ok
(
ret
.
foo
==
5
,
"Wrapped numbers copy correctly"
);
...
...
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