1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-04 13:10:09 +02:00

update dependencies

This commit is contained in:
s2
2018-10-09 09:51:34 +02:00
parent 4fcc873901
commit da4083f574
1112 changed files with 23205 additions and 21697 deletions

View File

@@ -1,7 +1,6 @@
'use strict'
const common = require('../common')
const fs = require('fs-extra')
const path = require('path')
const test = require('ava')
const util = require('./_util')
@@ -25,10 +24,14 @@ util.testSinglePlatform('default_app.asar removal test', (t, opts) => {
opts.electronVersion = '0.37.4'
return util.packageAndEnsureResourcesPath(t, opts)
.then(resourcesPath => fs.pathExists(path.join(resourcesPath, 'default_app.asar')))
.then(exists => t.false(exists, 'The output directory should not contain the Electron default_app.asar file'))
.then(resourcesPath => util.assertPathNotExists(t, path.join(resourcesPath, 'default_app.asar'), 'The output directory should not contain the Electron default_app.asar file'))
})
function assertUnpackedAsar (t, resourcesPath) {
return util.assertDirectory(t, path.join(resourcesPath, 'app.asar.unpacked'), 'app.asar.unpacked should exist under the resources subdirectory when opts.asar_unpack is set')
.then(() => util.assertDirectory(t, path.join(resourcesPath, 'app.asar.unpacked', 'dir_to_unpack'), 'dir_to_unpack should exist under app.asar.unpacked subdirectory when opts.asar-unpack-dir is set dir_to_unpack'))
}
util.testSinglePlatform('asar test', (t, opts) => {
opts.name = 'asarTest'
opts.dir = util.fixtureSubdir('basic')
@@ -36,20 +39,13 @@ util.testSinglePlatform('asar test', (t, opts) => {
'unpack': '*.pac',
'unpackDir': 'dir_to_unpack'
}
let resourcesPath
return util.packageAndEnsureResourcesPath(t, opts)
.then(generatedResourcesPath => {
resourcesPath = generatedResourcesPath
return fs.stat(path.join(resourcesPath, 'app.asar'))
}).then(stats => {
t.true(stats.isFile(), 'app.asar should exist under the resources subdirectory when opts.asar is true')
return fs.pathExists(path.join(resourcesPath, 'app'))
}).then(exists => {
t.false(exists, 'app subdirectory should NOT exist when app.asar is built')
return fs.stat(path.join(resourcesPath, 'app.asar.unpacked'))
}).then(stats => {
t.true(stats.isDirectory(), 'app.asar.unpacked should exist under the resources subdirectory when opts.asar_unpack is set some expression')
return fs.stat(path.join(resourcesPath, 'app.asar.unpacked', 'dir_to_unpack'))
}).then(stats => t.true(stats.isDirectory(), 'dir_to_unpack should exist under app.asar.unpacked subdirectory when opts.asar-unpack-dir is set dir_to_unpack'))
.then(resourcesPath => {
return Promise.all([
util.assertFile(t, path.join(resourcesPath, 'app.asar'), 'app.asar should exist under the resources subdirectory when opts.asar is true'),
util.assertPathNotExists(t, path.join(resourcesPath, 'app'), 'app subdirectory should NOT exist when app.asar is built'),
assertUnpackedAsar(t, resourcesPath)
])
})
})