Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6049507
commit d71bfa2
Showing
5 changed files
with
43 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
node_modules | ||
lib | ||
coverage | ||
coverage | ||
harness/app/* | ||
harness/out/* |
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 |
---|---|---|
|
@@ -8,4 +8,5 @@ coverage | |
.vscode | ||
!static | ||
!vendor | ||
!lib | ||
!lib | ||
harness |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Test Harness | ||
This test harness helps with verifying development in `electron-wix-msi`. | ||
Put an electron app into the `app` directory (we're using Slack as an example) | ||
and run `npm run harness` to ensure that the package works as intended. |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const path = require('path'); | ||
const fs = require('fs-extra'); | ||
|
||
const { MSICreator } = require('../lib/index'); | ||
|
||
const APP_DIR = path.join(__dirname, 'app'); | ||
const OUT_DIR = path.join(__dirname, 'out'); | ||
|
||
async function clean() { | ||
await fs.ensureDir(APP_DIR); | ||
await fs.emptyDir(OUT_DIR); | ||
} | ||
|
||
async function harness() { | ||
const msiCreator = new MSICreator({ | ||
appDirectory: APP_DIR, | ||
exe: 'slack', | ||
manufacturer: 'Slack Technologies', | ||
name: 'Slack', | ||
outputDirectory: OUT_DIR, | ||
description: 'Test', | ||
ui: { | ||
chooseDirectory: true | ||
}, | ||
version: '1.2.3.4' | ||
}); | ||
|
||
await msiCreator.create(); | ||
await msiCreator.compile(); | ||
} | ||
|
||
harness(); |
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