Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
1e9df674
...
1e9df6740572cb6dd0b439dfff105a092030d4b2
authored
2011-12-23 15:05:21 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
typos
1 parent
dd9ba434
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
tests/suites/cli.js
tests/suites/cli.js
View file @
1e9df67
(
function
(
t
,
phantom
)
{
t
.
comment
(
'phantom.extractC
li
Args()'
);
t
.
comment
(
'phantom.extractC
asper
Args()'
);
t
.
assertEquals
(
phantom
.
extractCasperArgs
([]),
{
args
:
[],
options
:
{}
},
'extractC
li
Args() returns a formatted object'
);
},
'extractC
asper
Args() returns a formatted object'
);
t
.
assertEquals
(
phantom
.
extractCasperArgs
([
'foo'
,
'bar'
]),
{
args
:
[
'foo'
,
'bar'
],
options
:
{}
},
'extractC
li
Args() can extract args'
);
},
'extractC
asper
Args() can extract args'
);
t
.
assertEquals
(
phantom
.
extractCasperArgs
([
'--foo=bar'
,
'--baz'
]),
{
args
:
[],
options
:
{
foo
:
'bar'
,
baz
:
true
}
},
'extractC
li
Args() can extract options and flags'
);
},
'extractC
asper
Args() can extract options and flags'
);
t
.
assertEquals
(
phantom
.
extractCasperArgs
([
'--&é"à=42'
]),
{
args
:
[],
options
:
{
'&é"à'
:
'42'
}
},
'extractC
li
Args() can extract exotic option name'
);
},
'extractC
asper
Args() can extract exotic option name'
);
t
.
assertEquals
(
phantom
.
extractCasperArgs
([
'foo'
,
'bar'
,
'--universe=42'
,
'--chucknorris'
]),
{
args
:
[
'foo'
,
'bar'
],
options
:
{
universe
:
'42'
,
chucknorris
:
true
}
},
'extractC
li
Args() can extract args, options and flags'
);
},
'extractC
asper
Args() can extract args, options and flags'
);
t
.
assertEquals
(
phantom
.
extractCasperArgs
([
'bar'
,
'--universe=42'
,
'--chucknorris'
,
'foo'
]),
{
args
:
[
'bar'
,
'foo'
],
options
:
{
universe
:
'42'
,
chucknorris
:
true
}
},
'extractC
li
Args() positional args order is preserved, option one has no importance'
);
},
'extractC
asper
Args() positional args order is preserved, option one has no importance'
);
t
.
done
();
})(
casper
.
test
,
phantom
);
...
...
Please
register
or
sign in
to post a comment