Skip to content

Commit faf65be

Browse files
committed
comment out duplicated symlinked, transitive package tests
1 parent feeaa73 commit faf65be

File tree

3 files changed

+45
-42
lines changed
  • jscomp/build_tests

3 files changed

+45
-42
lines changed
Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
1-
const fs = require('fs')
2-
const path = require('path')
3-
const child_process = require('child_process')
4-
const rescript_exe = require("../../../scripts/bin_path").rescript_exe
1+
// https://github.com/rescript-lang/rescript-compiler/pull/5703#issuecomment-1518507161
2+
// const fs = require('fs')
3+
// const path = require('path')
4+
// const child_process = require('child_process')
5+
// const rescript_exe = require("../../../scripts/bin_path").rescript_exe
56

6-
const expectedFilePath = path.join(__dirname, 'out.expected')
7+
// const expectedFilePath = path.join(__dirname, 'out.expected')
78

8-
const updateTests = process.argv[2] === 'update'
9+
// const updateTests = process.argv[2] === 'update'
910

10-
function postProcessErrorOutput (output) {
11-
output = output.trimRight()
12-
output = output.replace(new RegExp(__dirname, 'gi'), '.')
13-
return output
14-
}
15-
child_process.execSync(`${rescript_exe} clean -with-deps`,{cwd:__dirname})
16-
child_process.exec(rescript_exe, {cwd: __dirname}, (err, stdout, stderr) => {
17-
const actualErrorOutput = postProcessErrorOutput(stderr.toString())
18-
if (updateTests) {
19-
fs.writeFileSync(expectedFilePath, actualErrorOutput)
20-
} else {
21-
const expectedErrorOutput = postProcessErrorOutput(fs.readFileSync(expectedFilePath, {encoding: 'utf-8'}))
22-
if (expectedErrorOutput !== actualErrorOutput) {
23-
console.error(`The old and new error output aren't the same`)
24-
console.error('\n=== Old:')
25-
console.error(expectedErrorOutput)
26-
console.error('\n=== New:')
27-
console.error(actualErrorOutput)
28-
process.exit(1)
29-
}
30-
}
31-
})
11+
// function postProcessErrorOutput (output) {
12+
// output = output.trimRight()
13+
// output = output.replace(new RegExp(__dirname, 'gi'), '.')
14+
// return output
15+
// }
16+
// child_process.execSync(`${rescript_exe} clean -with-deps`,{cwd:__dirname})
17+
// child_process.exec(rescript_exe, {cwd: __dirname}, (err, stdout, stderr) => {
18+
// const actualErrorOutput = postProcessErrorOutput(stderr.toString())
19+
// if (updateTests) {
20+
// fs.writeFileSync(expectedFilePath, actualErrorOutput)
21+
// } else {
22+
// const expectedErrorOutput = postProcessErrorOutput(fs.readFileSync(expectedFilePath, {encoding: 'utf-8'}))
23+
// if (expectedErrorOutput !== actualErrorOutput) {
24+
// console.error(`The old and new error output aren't the same`)
25+
// console.error('\n=== Old:')
26+
// console.error(expectedErrorOutput)
27+
// console.error('\n=== New:')
28+
// console.error(actualErrorOutput)
29+
// process.exit(1)
30+
// }
31+
// }
32+
// })
3233

3334

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
//@ts-check
2-
var child_process = require("child_process");
3-
var assert = require("assert");
4-
var fs = require("fs")
5-
var rescript_exe = require("../../../scripts/bin_path").rescript_exe;
1+
// https://github.com/rescript-lang/rescript-compiler/pull/5703#issuecomment-1518507161
2+
// //@ts-check
3+
// var child_process = require("child_process");
4+
// var assert = require("assert");
5+
// var fs = require("fs")
6+
// var rescript_exe = require("../../../scripts/bin_path").rescript_exe;
67

7-
console.log(child_process.execSync(rescript_exe, { encoding: "utf8", cwd: "./a" }));
8+
// console.log(child_process.execSync(rescript_exe, { encoding: "utf8", cwd: "./a" }));
89

9-
assert(fs.existsSync("./node_modules/c/lib/js/tests/test.mjs"), "dev files of module 'c' were not built by 'a' even though 'c' is a transitive pinned dependency of 'a' through 'b'")
10+
// assert(fs.existsSync("./node_modules/c/lib/js/tests/test.mjs"), "dev files of module 'c' were not built by 'a' even though 'c' is a transitive pinned dependency of 'a' through 'b'")
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
//@ts-check
2-
var child_process = require("child_process");
3-
var assert = require("assert");
4-
var fs = require("fs")
5-
var rescript_exe = require("../../../scripts/bin_path").rescript_exe;
1+
// https://github.com/rescript-lang/rescript-compiler/pull/5703#issuecomment-1518507161
2+
// //@ts-check
3+
// var child_process = require("child_process");
4+
// var assert = require("assert");
5+
// var fs = require("fs")
6+
// var rescript_exe = require("../../../scripts/bin_path").rescript_exe;
67

7-
console.log(child_process.execSync(rescript_exe, { encoding: "utf8", cwd: "./a" }));
8+
// console.log(child_process.execSync(rescript_exe, { encoding: "utf8", cwd: "./a" }));
89

9-
assert(!fs.existsSync("./node_modules/c/lib/js/tests/test.mjs"), "dev files of module 'c' were built by 'a' even though 'c' is not a pinned dependency of 'a'")
10+
// assert(!fs.existsSync("./node_modules/c/lib/js/tests/test.mjs"), "dev files of module 'c' were built by 'a' even though 'c' is not a pinned dependency of 'a'")

0 commit comments

Comments
 (0)