Skip to content

Commit 40f8273

Browse files
authored
test: remove test-smoke (#129)
* test: remove test-smoke * no need to lint smoke * fix pretest
1 parent 316eb8f commit 40f8273

File tree

8 files changed

+1
-1482
lines changed

8 files changed

+1
-1482
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
electron.d.ts
22
node_modules
3-
test-smoke/electron/index.d.ts
4-
test-smoke/**/*.js
53
yarn.lock
64
.npmrc
75
.env

cli.js

-23
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env node
22
'use strict'
33

4-
const childProcess = require('child_process')
54
const fs = require('fs')
65
const path = require('path')
76
const tslint = require('tslint')
@@ -36,20 +35,6 @@ if (inFile) {
3635
apiPromise = fetchDocs()
3736
}
3837

39-
const typeCheck = () => {
40-
const tscExec = path.resolve(require.resolve('typescript'), '../../bin/tsc')
41-
const tscChild = childProcess.spawn('node', [tscExec, '--project', 'tsconfig.json'], {
42-
cwd: path.resolve(__dirname, 'test-smoke/electron')
43-
})
44-
tscChild.stdout.on('data', d => console.log(d.toString()))
45-
tscChild.stderr.on('data', d => console.error(d.toString()))
46-
tscChild.on('exit', (tscStatus) => {
47-
if (tscStatus !== 0) {
48-
process.exit(tscStatus)
49-
}
50-
})
51-
}
52-
5338
apiPromise.then(API => {
5439
return JSON.parse(JSON.stringify(API))
5540
}).then(API => {
@@ -63,9 +48,6 @@ apiPromise.then(API => {
6348

6449
if (result.failureCount === 0) {
6550
fs.writeFileSync(outFile, output)
66-
fs.writeFileSync(path.resolve(__dirname, 'test-smoke/electron/index.d.ts'), output)
67-
68-
typeCheck()
6951
} else {
7052
console.error('Failed to lint electron.d.ts')
7153
result.failures.forEach(failure => {
@@ -75,11 +57,6 @@ apiPromise.then(API => {
7557
console.log(failure)
7658
})
7759

78-
// Save file for debugging purpsoses
79-
const debugFile = path.resolve(__dirname, 'test-smoke/electron/index.d.ts')
80-
fs.writeFileSync(debugFile, output)
81-
console.log(`See ${debugFile}`)
82-
8360
process.exit(1)
8461
}
8562
})

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"prepublish": "npm run demo && npm run test-output",
1111
"lint-output": "tslint -c tslint.json -t verbose electron.d.ts --fix",
1212
"test": "mocha && standard --fix && npm run demo && npm run test-output && npm run lint-output",
13-
"pretest-output": "npm run build -- -o=test-smoke/electron/index.d.ts && cd test-smoke/electron/test && rm -f *.js",
14-
"test-output": "tslint electron.d.ts --format stylish && cd test-smoke/electron && tsc --project tsconfig.json",
13+
"test-output": "tslint electron.d.ts --format stylish",
1514
"prepack": "check-for-leaks",
1615
"prepush": "check-for-leaks",
1716
"semantic-release": "semantic-release pre && npm publish && semantic-release post"

test-smoke/electron/test/index.ts

Whitespace-only changes.

0 commit comments

Comments
 (0)