Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

breaking - changes to testRunner.setup#70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ShMcK merged 3 commits intomasterfromtestRunner-setup
Aug 6, 2020
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
NextNext commit
breaking - changes to testRunner.setup
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
  • Loading branch information
@ShMcK
ShMcK committedAug 2, 2020
commit7da0e08f2bfbb2e6f9b17e46bdbc1374b1050607
10 changes: 5 additions & 5 deletionssrc/schema/skeleton.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,14 +52,14 @@ export default {
description: "An optional folder for the test runner",
examples: ["coderoad"],
},
setup: {
$ref: "#/definitions/setup_action_without_commits",
description:
"Setup actions or commands used for setting up the test runner on tutorial launch",
},
},
required: ["command", "args"],
},
setup: {
$ref: "#/definitions/setup_action_without_commits",
description:
"Setup actions or commands used for setting up the test runner on tutorial launch",
},
repo: {
type: "object",
description: "The repo holding the git commits for the tutorial",
Expand Down
10 changes: 5 additions & 5 deletionssrc/schema/tutorial.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -71,14 +71,14 @@ export default {
description: "An optional folder for the test runner",
examples: ["coderoad"],
},
setup: {
$ref: "#/definitions/setup_action",
description:
"Setup commits or commands used for setting up the test runner on tutorial launch",
},
},
required: ["command", "args"],
},
setup: {
$ref: "#/definitions/setup_action",
description:
"Setup commits or commands used for setting up the test runner on tutorial launch",
},
repo: {
type: "object",
description: "The repo holding the git commits for the tutorial",
Expand Down
4 changes: 2 additions & 2 deletionssrc/utils/parse.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -153,8 +153,8 @@ export function parse(params: ParseParams): any {
// add init commits
if (params.commits.INIT && params.commits.INIT.length) {
// @ts-ignore
parsed.config.testRunner.setup = {
...(parsed.config?.testRunner?.setup || {}),
parsed.config.setup = {
...(parsed.config?.setup || {}),
commits: params.commits.INIT,
};
}
Expand Down
8 changes: 2 additions & 6 deletionssrc/validate.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -74,14 +74,10 @@ async function validate(args: string[]) {
await cherryPick(commits.INIT);

// run commands
if (skeleton.config?.testRunner?.setup?.commands) {
if (skeleton.config?.setup?.commands) {
console.info("-- Running commands...");

await runCommands(
skeleton.config?.testRunner?.setup?.commands,
// add optional setup directory
skeleton.config?.testRunner?.directory
);
await runCommands(skeleton.config?.setup?.commands);
}
}

Expand Down
18 changes: 9 additions & 9 deletionstests/parse.test.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -987,9 +987,9 @@ Description.
tap: "--reporter=mocha-tap-reporter",
},
directory: "coderoad",
setup: {
commands: [],
},
},
setup: {
commands: [],
},
appVersions: {
vscode: ">=0.7.0",
Expand DownExpand Up@@ -1026,9 +1026,9 @@ Description.
tap: "--reporter=mocha-tap-reporter",
},
directory: "coderoad",
setup: {
commands: [],
},
},
setup: {
commands: [],
},
repo: {
uri: "https://path.to/repo",
Expand DownExpand Up@@ -1101,9 +1101,9 @@ Description.
tap: "--reporter=mocha-tap-reporter",
},
directory: "coderoad",
setup: {
commits: ["abcdef1", "123456789"],
},
},
setup: {
commits: ["abcdef1", "123456789"],
},
repo: {
uri: "https://path.to/repo",
Expand Down
7 changes: 4 additions & 3 deletionstests/skeleton.test.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,15 +8,16 @@ const validJson = {
config: {
testRunner: {
directory: "coderoad",
setup: {
commands: [],
},

args: {
filter: "--grep",
tap: "--reporter=mocha-tap-reporter",
},
command: "./node_modules/.bin/mocha",
},
setup: {
commands: [],
},
repo: {
uri: "http://github.com/somePath/toRepo.git",
branch: "codeBranch",
Expand Down
8 changes: 4 additions & 4 deletionstests/tutorial.test.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,10 +13,10 @@ const validJson: Partial<T.Tutorial> = {
tap: "tap",
},
directory: "coderoad",
setup: {
commits: ["abcdef1"],
commands: ["npm install"],
},
},
setup: {
commits: ["abcdef1"],
commands: ["npm install"],
},
repo: {
uri: "https://github.com/some-repo.git",
Expand Down
2 changes: 1 addition & 1 deletiontypings/tutorial.d.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@ export type TutorialConfig = {
repo: TutorialRepo;
dependencies?: TutorialDependency[];
reset?: ConfigReset;
setup?: StepActions;
};

/** Logical groupings of tasks */
Expand DownExpand Up@@ -69,7 +70,6 @@ export interface TestRunnerConfig {
command: string;
args: TestRunnerArgs;
directory?: string;
setup?: StepActions;
}

export interface TutorialRepo {
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp