From 1c2b47cd4057164e1b888ec26cbe657f73f01304 Mon Sep 17 00:00:00 2001 From: Aftabnack Date: Tue, 13 Feb 2018 15:54:10 +0530 Subject: [PATCH] Added an integration test for deprecated cli options --- .../__tests__/deprecated-cli-options.test.js | 21 +++++++++++++++++++ .../deprecated-cli-options/__tests__/dummy.js | 3 +++ .../deprecated-cli-options/package.json | 3 +++ packages/jest-util/package.json | 1 - 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 integration-tests/__tests__/deprecated-cli-options.test.js create mode 100644 integration-tests/deprecated-cli-options/__tests__/dummy.js create mode 100644 integration-tests/deprecated-cli-options/package.json diff --git a/integration-tests/__tests__/deprecated-cli-options.test.js b/integration-tests/__tests__/deprecated-cli-options.test.js new file mode 100644 index 000000000000..ef86e5f36e82 --- /dev/null +++ b/integration-tests/__tests__/deprecated-cli-options.test.js @@ -0,0 +1,21 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +'use strict'; + +const path = require('path'); +const runJest = require('../runJest'); + +const dir = path.resolve(__dirname, '../deprecated-cli-options'); + +it('Prints deprecation warnings for CLI flags', () => { + const {stderr, stdout, status} = runJest(dir); + expect(status).toBe(0); + expect(stderr).toMatch(/Test Suites: 1 passed, 1 total/); +}); diff --git a/integration-tests/deprecated-cli-options/__tests__/dummy.js b/integration-tests/deprecated-cli-options/__tests__/dummy.js new file mode 100644 index 000000000000..5e7b71ee1a58 --- /dev/null +++ b/integration-tests/deprecated-cli-options/__tests__/dummy.js @@ -0,0 +1,3 @@ +test('Dummy', () => { + expect(2).toBe(2); +}); diff --git a/integration-tests/deprecated-cli-options/package.json b/integration-tests/deprecated-cli-options/package.json new file mode 100644 index 000000000000..586d4ca6b75c --- /dev/null +++ b/integration-tests/deprecated-cli-options/package.json @@ -0,0 +1,3 @@ +{ + "jest": {} +} diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index 26424ffb3456..ec6410e577e8 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -13,7 +13,6 @@ "graceful-fs": "^4.1.11", "is-ci": "^1.0.10", "jest-message-util": "^22.2.0", - "jest-validate": "^22.2.2", "mkdirp": "^0.5.1" }, "devDependencies": {