Skip to content

Commit

Permalink
test: clean up test names
Browse files Browse the repository at this point in the history
  • Loading branch information
malept committed Jan 22, 2020
1 parent 462c7ae commit 3be37bd
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
12 changes: 6 additions & 6 deletions test/asar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ const path = require('path')
const test = require('ava')
const util = require('./_util')

test('asar argument test: asar is not set', t => {
test('asar argument: asar is not set', t => {
const asarOpts = common.createAsarOpts({})
t.false(asarOpts, 'createAsarOpts returns false')
})

test('asar argument test: asar is true', t => {
test('asar argument: asar is true', t => {
t.deepEqual(common.createAsarOpts({ asar: true }), {})
})

test('asar argument test: asar is not an Object or a bool', t => {
test('asar argument: asar is not an Object or a bool', t => {
t.false(common.createAsarOpts({ asar: 'string' }), 'createAsarOpts returns false')
})

test.serial('default_app.asar removal test', util.testSinglePlatform(async (t, opts) => {
test.serial('default_app.asar removal', util.testSinglePlatform(async (t, opts) => {
opts.name = 'default_appASARTest'
opts.dir = util.fixtureSubdir('basic')

Expand All @@ -45,7 +45,7 @@ function incompatibleOptionWithPrebuiltAsarTest (extraOpts) {
return failedPrebuiltAsarTest(extraOpts, /is incompatible with prebuiltAsar/)
}

test.serial('asar test', util.testSinglePlatform(async (t, opts) => {
test.serial('asar', util.testSinglePlatform(async (t, opts) => {
opts.name = 'asarTest'
opts.dir = util.fixtureSubdir('basic')
opts.asar = {
Expand All @@ -61,7 +61,7 @@ test.serial('asar test', util.testSinglePlatform(async (t, opts) => {
])
}))

test.serial('prebuilt asar test', util.testSinglePlatform(async (t, opts) => {
test.serial('prebuilt asar', util.testSinglePlatform(async (t, opts) => {
util.setupConsoleWarnSpy()
opts.name = 'prebuiltAsarTest'
opts.dir = util.fixtureSubdir('asar-prebuilt')
Expand Down
4 changes: 2 additions & 2 deletions test/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ test('setting the quiet option does not print messages', t => {
t.true(console.error.notCalled, 'quieted common.info should not call console.error')
})

test('download argument test: download.{arch,platform,version,artifactName} does not overwrite {arch,platform,version,artifactName}', t => {
test('download argument: download.{arch,platform,version,artifactName} does not overwrite {arch,platform,version,artifactName}', t => {
const opts = {
download: {
arch: 'ia32',
Expand Down Expand Up @@ -151,7 +151,7 @@ test.serial('overwrite', util.testSinglePlatform(async (t, opts) => {
await util.assertPathNotExists(t, testPath, 'The output directory should be regenerated when overwrite is true')
}))

test.serial('overwrite test sans platform/arch set', util.testSinglePlatform(async (t, opts) => {
test.serial('overwrite sans platform/arch set', util.testSinglePlatform(async (t, opts) => {
delete opts.platfrom
delete opts.arch
opts.dir = util.fixtureSubdir('basic')
Expand Down
2 changes: 1 addition & 1 deletion test/darwin.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ async function appHelpersBundleElectron6Test (t, opts) {

if (!(process.env.CI && process.platform === 'win32')) {
test.serial('helper app paths', darwinTest(helperAppPathsTest))
test.serial('helper app paths test with app name needing sanitization', darwinTest(helperAppPathsTest, { name: '@username/package-name' }, '@username-package-name'))
test.serial('helper app paths with app name needing sanitization', darwinTest(helperAppPathsTest, { name: '@username/package-name' }, '@username-package-name'))

const iconBase = path.join(__dirname, 'fixtures', 'monochrome')
const icnsPath = `${iconBase}.icns`
Expand Down
4 changes: 2 additions & 2 deletions test/prune.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async function createPruneOptionTest (t, baseOpts, prune, testMessage) {
])
}

test.serial('prune test', util.testSinglePlatform(async (t, baseOpts) => {
test.serial('prune: true', util.testSinglePlatform(async (t, baseOpts) => {
await createPruneOptionTest(t, baseOpts, true, 'package.json devDependency should NOT exist under app/node_modules')
}))

Expand All @@ -50,7 +50,7 @@ test.serial('prune electron in dependencies', util.testSinglePlatform(async (t,
await checkDependency(t, resourcesPath, 'electron', false)
}))

test.serial('prune: false test', util.testSinglePlatform(createPruneOptionTest, false, 'package.json devDependency should exist under app/node_modules'))
test.serial('prune: false', util.testSinglePlatform(createPruneOptionTest, false, 'package.json devDependency should exist under app/node_modules'))

test('isModule properly detects module folders', async t => {
const isModule = name => prune.isModule(util.fixtureSubdir(path.join('prune-is-module', 'node_modules', name)))
Expand Down
2 changes: 1 addition & 1 deletion test/targets.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ test('build for all available official targets for a version without arm64 or mi
'Packages should be generated for all possible platforms (except linux/arm64, linux/mips64el, or win32/arm64)'))
test('platform=all (one arch)',
testMultiTarget({ arch: 'ia32', platform: 'all' }, 2, 'Packages should be generated for both 32-bit platforms'))
test('arch=all test (one platform)',
test('arch=all (one platform)',
testMultiTarget({ arch: 'all', platform: 'linux' }, 3, 'Packages should be generated for all expected architectures'))

testCombinations('multi-platform / multi-arch test, from arrays', ['ia32', 'x64'], ['linux', 'win32'])
Expand Down
20 changes: 10 additions & 10 deletions test/win32.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,29 +185,29 @@ function win32Test (extraOpts, executableBasename, executableMessage) {
}

if (!(process.env.CI && process.platform === 'darwin')) {
test.serial('win32 executable name is based on sanitized app name', win32Test(
test.serial('win32: executable name is based on sanitized app name', win32Test(
{ name: '@username/package-name' },
'@username-package-name',
'The sanitized EXE filename should exist'
))

test.serial('win32 executable name uses executableName when available', win32Test(
test.serial('win32: executable name uses executableName when available', win32Test(
{ name: 'PackageName', executableName: 'my-package' },
'my-package',
'the executableName-based filename should exist'
))

test.serial('win32 icon set', win32Test(
test.serial('win32: set icon', win32Test(
{ executableName: 'iconTest', arch: 'ia32', icon: path.join(__dirname, 'fixtures', 'monochrome') },
'iconTest',
'the Electron executable should exist'
))

test('win32 build version sets FileVersion test', setFileVersionTest('2.3.4.5'))
test('win32 app version sets ProductVersion test', setProductVersionTest('5.4.3.2'))
test('win32 app copyright sets LegalCopyright test', setCopyrightTest('Copyright Bar'))
test('win32 set LegalCopyright and CompanyName test', setCopyrightAndCompanyNameTest('Copyright Bar', 'MyCompany LLC'))
test('win32 set CompanyName test', setCompanyNameTest('MyCompany LLC'))
test('win32 set requested-execution-level test', setRequestedExecutionLevelTest('asInvoker'))
test('win32 set application-manifest test', setApplicationManifestTest('/path/to/manifest.xml'))
test('win32: build version sets FileVersion', setFileVersionTest('2.3.4.5'))
test('win32: app version sets ProductVersion', setProductVersionTest('5.4.3.2'))
test('win32: app copyright sets LegalCopyright', setCopyrightTest('Copyright Bar'))
test('win32: set LegalCopyright and CompanyName', setCopyrightAndCompanyNameTest('Copyright Bar', 'MyCompany LLC'))
test('win32: set CompanyName', setCompanyNameTest('MyCompany LLC'))
test('win32: set requested-execution-level', setRequestedExecutionLevelTest('asInvoker'))
test('win32: set application-manifest', setApplicationManifestTest('/path/to/manifest.xml'))
}

0 comments on commit 3be37bd

Please sign in to comment.