Commit 1e9df674 1e9df6740572cb6dd0b439dfff105a092030d4b2 by Nicolas Perriault

typos

1 parent dd9ba434
(function(t, phantom) {
t.comment('phantom.extractCliArgs()');
t.comment('phantom.extractCasperArgs()');
t.assertEquals(phantom.extractCasperArgs([]), {
args: [],
options: {}
}, 'extractCliArgs() returns a formatted object');
}, 'extractCasperArgs() returns a formatted object');
t.assertEquals(phantom.extractCasperArgs(['foo', 'bar']), {
args: ['foo', 'bar'],
options: {}
}, 'extractCliArgs() can extract args');
}, 'extractCasperArgs() can extract args');
t.assertEquals(phantom.extractCasperArgs(['--foo=bar', '--baz']), {
args: [],
options: { foo: 'bar', baz: true }
}, 'extractCliArgs() can extract options and flags');
}, 'extractCasperArgs() can extract options and flags');
t.assertEquals(phantom.extractCasperArgs(['--&é"à=42']), {
args: [],
options: { '&é"à': '42' }
}, 'extractCliArgs() can extract exotic option name');
}, 'extractCasperArgs() can extract exotic option name');
t.assertEquals(phantom.extractCasperArgs(['foo', 'bar', '--universe=42', '--chucknorris']), {
args: ['foo', 'bar'],
options: { universe: '42', chucknorris: true }
}, 'extractCliArgs() can extract args, options and flags');
}, 'extractCasperArgs() can extract args, options and flags');
t.assertEquals(phantom.extractCasperArgs(['bar', '--universe=42', '--chucknorris', 'foo']), {
args: ['bar', 'foo'],
options: { universe: '42', chucknorris: true }
}, 'extractCliArgs() positional args order is preserved, option one has no importance');
}, 'extractCasperArgs() positional args order is preserved, option one has no importance');
t.done();
})(casper.test, phantom);
......