Skip to content

Commit

Permalink
yarn format
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Oct 20, 2022
1 parent beee79f commit 8ccdd4a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ import { randomBytes } from 'crypto';

const treeKill = promisify(_treeKill);

// this is passed to Keystone
process.env.SESSION_SECRET = randomBytes(32).toString('hex')

// this'll take a while
jest.setTimeout(100000);

Expand Down Expand Up @@ -90,16 +87,23 @@ describe.each(['development', 'production'] as const)('%s', (mode) => {
}

if (mode === 'development') {
// process.env.SESSION_SECRET is randomly generated for this

test('start keystone in dev', async () => {
await startKeystone('dev');
});
}

if (mode === 'production') {
process.env.SESSION_SECRET = randomBytes(32).toString('hex');

test('build keystone', async () => {
let keystoneBuildProcess = promisifiedExecFile('yarn', ['build'], {
cwd: projectDir,
env: process.env,
env: {
...process.env,
NODE_ENV: 'production',
},
});
const logChunk = (chunk: any) => {
console.log(chunk.toString('utf8'));
Expand Down

0 comments on commit 8ccdd4a

Please sign in to comment.