Skip to content

Commit

Permalink
test: delete temp directory (#1958)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroppy authored and evilebottnawi committed Jun 4, 2019
1 parent 79325e5 commit 27eb99c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -14,4 +14,4 @@ node_modules

.eslintcache

test/temp/*.css
test/fixtures/reload-config/main.css
4 changes: 2 additions & 2 deletions test/SockJSServer.test.js
Expand Up @@ -40,11 +40,11 @@ describe('SockJSServer', () => {

const client = new SockJS('http://localhost:8080/sockjs-node');

client.onmessage = function(e) {
client.onmessage = (e) => {
data.push(e.data);
};

client.onclose = function() {
client.onclose = () => {
data.push('close');
};

Expand Down
8 changes: 5 additions & 3 deletions test/e2e/Client.test.js
Expand Up @@ -4,14 +4,15 @@
no-undef
*/
const fs = require('fs');
const path = require('path');
const { resolve } = require('path');
const testServer = require('../helpers/test-server');
const reloadConfig = require('../fixtures/reload-config/webpack.config');
const runBrowser = require('../helpers/run-browser');

const cssFilePath = resolve(__dirname, '../fixtures/reload-config/main.css');

describe('reload', () => {
describe('hot', () => {
const cssFilePath = path.resolve(__dirname, '../temp/main.css');
beforeAll((done) => {
fs.writeFileSync(
cssFilePath,
Expand All @@ -30,6 +31,7 @@ describe('reload', () => {
});

afterAll((done) => {
fs.unlinkSync(cssFilePath);
testServer.close(done);
});

Expand Down Expand Up @@ -91,7 +93,6 @@ describe('reload', () => {
});

describe('inline', () => {
const cssFilePath = path.resolve(__dirname, '../temp/main.css');
beforeAll((done) => {
fs.writeFileSync(
cssFilePath,
Expand All @@ -110,6 +111,7 @@ describe('reload', () => {
});

afterAll((done) => {
fs.unlinkSync(cssFilePath);
testServer.close(done);
});

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/reload-config/foo.js
@@ -1,4 +1,4 @@
'use strict';

// eslint-disable-next-line import/no-unresolved
require('../../temp/main.css');
require('./main.css');
1 change: 0 additions & 1 deletion test/temp/README.md

This file was deleted.

0 comments on commit 27eb99c

Please sign in to comment.