From f269565902122cd37830ac8daaace2dccb1811d4 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Tue, 20 Oct 2020 16:27:18 +0200 Subject: [PATCH] Remove unneeded tests --- .../bad-next-config/pages/index.js | 7 -- .../bad-next-config/test/index.test.js | 76 ------------------- 2 files changed, 83 deletions(-) delete mode 100644 test/integration/image-component/bad-next-config/pages/index.js delete mode 100644 test/integration/image-component/bad-next-config/test/index.test.js diff --git a/test/integration/image-component/bad-next-config/pages/index.js b/test/integration/image-component/bad-next-config/pages/index.js deleted file mode 100644 index ff2547f9c51e9..0000000000000 --- a/test/integration/image-component/bad-next-config/pages/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import React from 'react' - -const page = () => { - return
Hello
-} - -export default page diff --git a/test/integration/image-component/bad-next-config/test/index.test.js b/test/integration/image-component/bad-next-config/test/index.test.js deleted file mode 100644 index da8c8963c6fbd..0000000000000 --- a/test/integration/image-component/bad-next-config/test/index.test.js +++ /dev/null @@ -1,76 +0,0 @@ -/* eslint-env jest */ - -import { join } from 'path' -import { nextBuild } from 'next-test-utils' -import fs from 'fs-extra' - -jest.setTimeout(1000 * 30) - -const appDir = join(__dirname, '../') -const nextConfig = join(appDir, 'next.config.js') - -describe('Next.config.js images prop without default host', () => { - let build - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = { - images: { - sizes: [480, 1024, 1600], - hosts: { - secondary: { - path: 'https://examplesecondary.com/images/', - loader: 'cloudinary', - }, - }, - }, - }`, - 'utf8' - ) - build = await nextBuild(appDir, [], { - stdout: true, - stderr: true, - }) - }) - it('Should error during build if images prop in next.config is malformed', () => { - expect(build.stderr).toContain( - 'If the image configuration property is present in next.config.js, it must have a host named "default"' - ) - }) -}) - -describe('Next.config.js images prop without path', () => { - let build - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = { - images: { - sizes: [480, 1024, 1600], - hosts: { - default: { - path: 'https://examplesecondary.com/images/', - loader: 'cloudinary', - }, - secondary: { - loader: 'cloudinary', - }, - }, - }, - }`, - 'utf8' - ) - build = await nextBuild(appDir, [], { - stdout: true, - stderr: true, - }) - }) - afterAll(async () => { - await fs.remove(nextConfig) - }) - it('Should error during build if images prop in next.config is malformed', () => { - expect(build.stderr).toContain( - 'All hosts defined in the image configuration property of next.config.js must define a path' - ) - }) -})