You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
867 B
30 lines
867 B
![]()
2 years ago
|
import { script } from "./shellcode/script"
|
||
|
import { Bash, Fish, PowerShell, Zsh } from "./shellcode/shells"
|
||
|
import describe from "./describe"
|
||
|
|
||
|
for (const shell of [Bash, Zsh, Fish, PowerShell]) {
|
||
|
describe(shell, () => {
|
||
|
test(`uninstalls a version`, async () => {
|
||
|
await script(shell)
|
||
|
.then(shell.call("fnm", ["install", "12.0.0"]))
|
||
|
.then(shell.call("fnm", ["alias", "12.0.0", "hello"]))
|
||
|
.then(
|
||
|
shell.scriptOutputContains(
|
||
|
shell.scriptOutputContains(shell.call("fnm", ["ls"]), "v12.0.0"),
|
||
|
"hello"
|
||
|
)
|
||
|
)
|
||
|
.then(shell.call("fnm", ["uninstall", "hello"]))
|
||
|
.then(
|
||
|
shell.hasCommandOutput(
|
||
|
shell.call("fnm", ["ls"]),
|
||
|
"* system",
|
||
|
"fnm ls"
|
||
|
)
|
||
|
)
|
||
|
.takeSnapshot(shell)
|
||
|
.execute(shell)
|
||
|
})
|
||
|
})
|
||
|
}
|