Skip to content

Commit 98fe6f6

Browse files
chore: leave a link to Testplane config docs
1 parent f95d937 commit 98fe6f6

File tree

9 files changed

+11
-1
lines changed

9 files changed

+11
-1
lines changed

__fixtures/config/jsConfig.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Read more about configuring Testplane at https://testplane.io/docs/v8/config/main/
12
module.exports = {
23
gridUrl: 'local',
34
baseUrl: 'http://localhost',

__fixtures/config/withComments.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Read more about configuring Testplane at https://testplane.io/docs/v8/config/main/
12
module.exports = {
23
// some comment
34
// other comment

__fixtures/config/withEverything.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import path from "path";
33

44
const isCi = Boolean(process.env.CI);
55

6+
// Read more about configuring Testplane at https://testplane.io/docs/v8/config/main/
67
export default {
78
gridUrl: "local",
89
baseUrl: "http://localhost",

__fixtures/config/withExpressions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Read more about configuring Testplane at https://testplane.io/docs/v8/config/main/
12
module.exports = {
23
foo: Boolean(100 + 500 * 1),
34
bar: 4,

__fixtures/config/withModules.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ const fs = require('fs');
22
const os = require('os');
33
const path = require('path');
44

5+
// Read more about configuring Testplane at https://testplane.io/docs/v8/config/main/
56
module.exports = {};

__fixtures/config/withTypescript.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ import fs from "fs";
22
import os from "os";
33
import path from "path";
44

5+
// Read more about configuring Testplane at https://testplane.io/docs/v8/config/main/
56
export default {} satisfies import("testplane").ConfigInput;

__fixtures/config/withVariables.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ const isCi = process.env.CI;
22
const numbersSum = 100 + 500;
33
const somePath = path.resolve(os.homedir(), ".some-folder");
44

5+
// Read more about configuring Testplane at https://testplane.io/docs/v8/config/main/
56
module.exports = {};

src/constants/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const TESTPLANE_CONFIG_URL = "https://testplane.io/docs/v8/config/main/";

src/fsUtils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import _ from "lodash";
22
import fs from "fs";
33
import path from "path";
44
import { defaultTestplaneTestsDir } from "./constants/defaultTestplaneConfig";
5+
import { TESTPLANE_CONFIG_URL } from "./constants";
56
import type { TestplaneConfig } from "./types/testplaneConfig";
67

78
const createDirectory = (path: string): Promise<string | undefined> => fs.promises.mkdir(path, { recursive: true });
@@ -123,7 +124,8 @@ export const writeTestplaneConfig = async (dirPath: string, testplaneConfig: Tes
123124
.map(variable => `const ${variable} = ${variables[variable]};`)
124125
.join("\n");
125126

126-
const configBody = template.getExportConfig(getObjectRepr(omittedConfig));
127+
const rawConfigBody = template.getExportConfig(getObjectRepr(omittedConfig));
128+
const configBody = `// Read more about configuring Testplane at ${TESTPLANE_CONFIG_URL}\n${rawConfigBody}`;
127129

128130
const configContents = [configImports, configVariables, configBody].filter(Boolean).join("\n\n");
129131
const configFileName = template.fileName;

0 commit comments

Comments
 (0)