Skip to content

Commit

Permalink
chore: move tests to test dir. cleanup test config format.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjpillsbury committed Nov 16, 2022
1 parent fc37073 commit 1810751
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/upchunk.spec.js → test/upchunk.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { expect } from '@open-wc/testing';
import { createUpload, UpChunk } from './upchunk';
import { createUpload, UpChunk } from '../src/upchunk';

const fakeFile = () => {
return new File(['foo'], 'foo.mp4', {
Expand Down
2 changes: 1 addition & 1 deletion src/upchunk.spec.ts → test/upchunk.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect } from '@open-wc/testing';
import xhrMock, { sequence, delay } from 'xhr-mock';
import xhr from 'xhr';
import { UpChunk, createUpload, UpChunkOptions } from './upchunk';
import { UpChunk, createUpload, UpChunkOptions } from '../src/upchunk';

describe('integration', () => {
const endpoint = `https://this-is-a-fake-url.com/upload/endpoint`;
Expand Down
11 changes: 4 additions & 7 deletions test/web-test-runner.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,18 @@ import { importMapsPlugin } from '@web/dev-server-import-maps';

export default {
nodeResolve: true,
/** @TODO Final home for tests. Uncomment before PR merge */
// files: ['test/**/*.spec.js', 'test/**/*.spec.ts'],
/** @TODO Interim home for tests to make diff/code review easier. Remove before PR merge */
files: ['src/**/*.spec.js', 'src/**/*.spec.ts'],
files: ['test/**/*.spec.js', 'test/**/*.spec.ts'],
plugins: [
importMapsPlugin({
inject: {
importMap: {
imports: {
'xhr': './test/dist/xhr.mjs',
xhr: './test/dist/xhr.mjs',
'xhr-mock': './test/dist/xhr-mock.mjs',
},
},
},
}),
esbuildPlugin({ ts: true })
esbuildPlugin({ ts: true }),
],
};
};

0 comments on commit 1810751

Please sign in to comment.