Skip to content

Commit

Permalink
tests: cache flags
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Oct 4, 2020
1 parent d15d78a commit 3a26ee2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/cleanupTest.js
Expand Up @@ -12,7 +12,7 @@ const outputDirectories = [
'test-plugin',
'test-loader',
'test-cache-path',
'test-locate-path',
'test-locate-cache',
'stats.json',
];

Expand Down
4 changes: 4 additions & 0 deletions test/core-flags/cache-flags.test.js
@@ -1,6 +1,8 @@
'use strict';

const { run } = require('../utils/test-utils');
const { existsSync } = require('fs');
const { resolve } = require('path');

describe('cache related flags from core', () => {
it('should be successful with --cache ', () => {
Expand Down Expand Up @@ -29,13 +31,15 @@ describe('cache related flags from core', () => {

expect(stderr).toBeFalsy();
expect(stdout).toContain('test-cache-path');
expect(existsSync(resolve(__dirname, './test-cache-path'))).toBeTruthy();
});

it('should set cache.cacheLocation with --cache-cache-locations', () => {
const { stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '--cache-cache-location', './test-locate-cache']);

expect(stderr).toBeFalsy();
expect(stdout).toContain('test-locate-cache');
expect(existsSync(resolve(__dirname, './test-locate-cache'))).toBeTruthy();
});

it('should set cache.hashAlgorithm with --cache-hash-algorithm', () => {
Expand Down

0 comments on commit 3a26ee2

Please sign in to comment.