Skip to content

Commit

Permalink
Fix test.only calls so test suite can run (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianm-stripe authored Nov 8, 2024
1 parent c51e93d commit 95b0a35
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/suite/shellEscape.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,32 @@ suite('shellEscape', () => {
const output = shellEscape(['--project-name', `'test's "name"'`]); // 'test's "name"'
assert.strictEqual(output, `--project-name \\''test'\\''s "name"'\\'`); // --project-name \''test'\''s "name"'\'
});
test.only('non windows case: flag with backspace character', () => {
test('non windows case: flag with backspace character', () => {
sandbox.stub(utils, 'getOSType').returns(utils.OSType.macOSarm);
const output = shellEscape(['--project-name', `\\bte\\bst | whoami`]);
assert.strictEqual(output, `--project-name '\\\\bte\\\\bst | whoami'`);
});
test.only('windows case: flag with space', () => {
test('windows case: flag with space', () => {
sandbox.stub(utils, 'getOSType').returns(utils.OSType.windows);
const output = shellEscape(['--project-name', 'test | whoami']); // test | whoami
assert.strictEqual(output, `--project-name "test | whoami"`); // --project-name "test | whoami"
});
test.only('windows case: flag with single quote around entire arg', () => {
test('windows case: flag with single quote around entire arg', () => {
sandbox.stub(utils, 'getOSType').returns(utils.OSType.windows);
const output = shellEscape(['--project-name', `'test name'`]); // 'test name'
assert.strictEqual(output, `--project-name "'test name'"`); // --project-name "'test name'"
});
test.only('windows case: flag with double quote', () => {
test('windows case: flag with double quote', () => {
sandbox.stub(utils, 'getOSType').returns(utils.OSType.windows);
const output = shellEscape(['--project-name', `test "name"`]); // test "name"
assert.strictEqual(output, `--project-name "test \\"name\\""`); // --project-name "test \"name\""
});
test.only('windows case: flag with lots of quotes', () => {
test('windows case: flag with lots of quotes', () => {
sandbox.stub(utils, 'getOSType').returns(utils.OSType.windows);
const output = shellEscape(['--project-name', `'test's "name"'`]); // 'test's "name"'
assert.strictEqual(output, `--project-name "'test's \\"name\\"'"`); // --project-name "'test's \"name\"'"
});
test.only('windows case: flag with backspace character', () => {
test('windows case: flag with backspace character', () => {
sandbox.stub(utils, 'getOSType').returns(utils.OSType.windows);
const output = shellEscape(['--project-name', `\\bte\\bst | whoami`]);
assert.strictEqual(output, `--project-name "\\\\bte\\\\bst | whoami"`);
Expand Down

0 comments on commit 95b0a35

Please sign in to comment.