-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make --no-wrap work as advertised.
Fix and test handling of wrap option to w3 up. | flag | result | |--------------|-------------| | undefined | wrap: true | | --wrap | wrap: true | | --wrap true | wrap: true | | --wrap=true | wrap: true | | --wrap false | wrap: false | | --wrap=false | wrap: false | | --no-wrap | wrap: false | License: MIT Signed-off-by: Oli Evans <[email protected]>
- Loading branch information
Showing
2 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -620,6 +620,70 @@ export const testW3Up = { | |
assert.match(up.error, /Stored 1 file/) | ||
}), | ||
|
||
'w3 up --no-wrap': test(async (assert, context) => { | ||
const email = '[email protected]' | ||
await login(context, { email }) | ||
await selectPlan(context, { email }) | ||
|
||
const create = await w3 | ||
.args([ | ||
'space', | ||
'create', | ||
'home', | ||
'--no-recovery', | ||
'--no-account', | ||
'--customer', | ||
email, | ||
]) | ||
.env(context.env.alice) | ||
.join() | ||
|
||
assert.ok(create.status.success()) | ||
|
||
const up = await w3 | ||
.args(['up', 'test/fixtures/pinpie.jpg', '--no-wrap']) | ||
.env(context.env.alice) | ||
.join() | ||
|
||
assert.match( | ||
up.output, | ||
/bafkreiajkbmpugz75eg2tmocmp3e33sg5kuyq2amzngslahgn6ltmqxxfa/ | ||
) | ||
assert.match(up.error, /Stored 1 file/) | ||
}), | ||
|
||
'only w3 up --wrap false': test(async (assert, context) => { | ||
const email = '[email protected]' | ||
await login(context, { email }) | ||
await selectPlan(context, { email }) | ||
|
||
const create = await w3 | ||
.args([ | ||
'space', | ||
'create', | ||
'home', | ||
'--no-recovery', | ||
'--no-account', | ||
'--customer', | ||
email, | ||
]) | ||
.env(context.env.alice) | ||
.join() | ||
|
||
assert.ok(create.status.success()) | ||
|
||
const up = await w3 | ||
.args(['up', 'test/fixtures/pinpie.jpg', '--no-wrap']) | ||
.env(context.env.alice) | ||
.join() | ||
|
||
assert.match( | ||
up.output, | ||
/bafkreiajkbmpugz75eg2tmocmp3e33sg5kuyq2amzngslahgn6ltmqxxfa/ | ||
) | ||
assert.match(up.error, /Stored 1 file/) | ||
}), | ||
|
||
'w3 up --car': test(async (assert, context) => { | ||
const email = '[email protected]' | ||
await login(context, { email }) | ||
|