Skip to content

Commit

Permalink
feat(deps): eslint-plugin-unicorn@38
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Nov 4, 2021
1 parent eec1f63 commit 40b1a72
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 140 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^25.0.5",
"eslint-plugin-jsdoc": "^37.0.0",
"eslint-plugin-unicorn": "^37.0.1",
"eslint-plugin-unicorn": "^38.0.0",
"eslint-plugin-unused-imports": "^1.1.1",
"eslint-plugin-vue": "^8.0.1",
"execa": "^5.0.0",
Expand Down
19 changes: 3 additions & 16 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
import { buildProdCommand } from './cmd/build-prod.command'
import type { BuildInfo } from './util/buildInfo.model'
import { generateBuildInfo } from './util/buildInfo.util'

export { generateBuildInfo, buildProdCommand }
export type { BuildInfo }

export * from './util/git.util'

declare global {
namespace NodeJS {
interface ProcessEnv {
TZ?: string
APP_ENV?: string
JEST_NO_ALPHABETIC?: string
}
}
}
export { buildProdCommand } from './cmd/build-prod.command'
export type { BuildInfo } from './util/buildInfo.model'
export { generateBuildInfo } from './util/buildInfo.util'
2 changes: 1 addition & 1 deletion src/test/env.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test('APP_ENV should be `test`', () => {
expect(process.env.APP_ENV).toBe('test')
expect(process.env['APP_ENV']).toBe('test')
})

test('TZ should be UTC', () => {
Expand Down
25 changes: 7 additions & 18 deletions src/testing/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
import * as timekeeper from 'timekeeper'
import { jestOffline } from '../jestOffline.util'
import { expectResults } from './expect.util'
import { mockAllKindsOfThings } from './mockAllKindsOfThings'
import { deepFreeze, silentConsole } from './testing.util'
import { mockTime, mockTimeMillis, MOCK_TS_2018_06_21, resetTime } from './time.util'

export {
jestOffline,
deepFreeze,
silentConsole,
mockTime,
mockTimeMillis,
resetTime,
MOCK_TS_2018_06_21,
timekeeper,
mockAllKindsOfThings,
expectResults,
}
// eslint-disable-next-line unicorn/prefer-export-from
export { timekeeper }
export { jestOffline } from '../jestOffline.util'
export { expectResults } from './expect.util'
export { mockAllKindsOfThings } from './mockAllKindsOfThings'
export { deepFreeze, silentConsole } from './testing.util'
export { mockTime, mockTimeMillis, MOCK_TS_2018_06_21, resetTime } from './time.util'
4 changes: 2 additions & 2 deletions src/util/jest.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ export async function runJest(opt: RunJestOpt = {}): Promise<void> {
})
}

if (!integration && !manual && !process.env.APP_ENV) {
if (!integration && !manual && !process.env['APP_ENV']) {
Object.assign(env, {
APP_ENV: 'test',
})
}

if (!process.env.JEST_NO_ALPHABETIC) {
if (!process.env['JEST_NO_ALPHABETIC']) {
args.push(`--testSequencer=${cfgDir}/jest.alphabetic.sequencer.js`)
}

Expand Down
Loading

0 comments on commit 40b1a72

Please sign in to comment.