-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WHEW i think everything should be passing now, removing debug console…
… log junk
- Loading branch information
Observable User
committed
Nov 2, 2024
1 parent
87f707d
commit 159d708
Showing
3 changed files
with
11 additions
and
17 deletions.
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 |
---|---|---|
|
@@ -260,7 +260,11 @@ describe("deploy", () => { | |
await deploy(TEST_OPTIONS, effects); | ||
assert.fail("expected error"); | ||
} catch (error) { | ||
CliError.assert(error, {message: `Configured repository does not match local repository; check build settings on ${link(`https://observablehq.com/projects/@${DEPLOY_CONFIG.workspaceLogin}/${DEPLOY_CONFIG.projectSlug}/settings`)}`}); | ||
CliError.assert(error, { | ||
message: `Configured repository does not match local repository; check build settings on ${link( | ||
`https://observablehq.com/projects/@${DEPLOY_CONFIG.workspaceLogin}/${DEPLOY_CONFIG.projectSlug}/settings` | ||
)}` | ||
}); | ||
} | ||
|
||
effects.close(); | ||
|
@@ -290,10 +294,9 @@ describe("deploy", () => { | |
); | ||
|
||
await (await open("readme.md", "a")).close(); | ||
const {stdout, stderr} = await promisify(exec)( | ||
await promisify(exec)( | ||
"git add . && git commit -m 'initial' && git remote add origin [email protected]:observablehq/test.git" | ||
); | ||
console.log("starts cloud build test", {stdout, stderr}); | ||
|
||
await deploy(TEST_OPTIONS, effects); | ||
|
||
|
@@ -325,10 +328,9 @@ describe("deploy", () => { | |
); | ||
|
||
await (await open("readme.md", "a")).close(); | ||
const {stdout, stderr} = await promisify(exec)( | ||
await promisify(exec)( | ||
"git add . && git commit -m 'initial' && git remote add origin [email protected]:observablehq/test.git" | ||
); | ||
console.log("starts cloud build test", {stdout, stderr}); | ||
|
||
await deploy(TEST_OPTIONS, effects); | ||
|
||
|
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 |
---|---|---|
|
@@ -3,7 +3,6 @@ import {mkdtemp, rm} from "fs/promises"; | |
import {tmpdir} from "os"; | ||
import {join} from "path/posix"; | ||
import {promisify} from "util"; | ||
// import {rimraf} from "rimraf"; | ||
|
||
export function mockIsolatedDirectory({git}: {git: boolean}) { | ||
let dir: string; | ||
|
@@ -13,19 +12,14 @@ export function mockIsolatedDirectory({git}: {git: boolean}) { | |
dir = await mkdtemp(join(tmpdir(), "framework-test-")); | ||
process.chdir(dir); | ||
if (git) { | ||
console.log("logging stdout, stderr"); | ||
const a = await promisify(exec)( | ||
'git config --global user.email "[email protected]" && git config --global user.name "Observable User" && git config --global init.defaultBranch main' | ||
await promisify(exec)( | ||
'git config --global user.email "[email protected]" && git config --global user.name "Observable User" && git config --global init.defaultBranch main && git init' | ||
); | ||
console.log(a.stdout, a.stderr); | ||
const b = await promisify(exec)("git init"); | ||
console.log(b.stdout, b.stderr); | ||
} | ||
}); | ||
|
||
afterEach(async () => { | ||
process.chdir(cwd); | ||
// await rimraf(dir); | ||
await rm(dir, {recursive: true}); //, force: true | ||
await rm(dir, {recursive: true}); | ||
}); | ||
} |