Skip to content

Commit

Permalink
[Internals] Improve unit tests (sveltejs#4262)
Browse files Browse the repository at this point in the history
  • Loading branch information
himynameisdave authored and jesseskinner committed Feb 27, 2020
1 parent 9605a75 commit 24c319f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- run: 'npm i && npm run lint'
Unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- run: 'npm i && npm run test:unit'
4 changes: 2 additions & 2 deletions src/compiler/compile/utils/__test__.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('get_name_from_filename', () => {
assert.equal(get_name_from_filename('path/to/Widget/index.svelte'), 'Widget');
});

it('handles unusual filenames', () => {
assert.equal(get_name_from_filename('path/to/[...parts].svelte'), 'Parts');
it('handles Windows filenames', () => {
assert.equal(get_name_from_filename('path\\to\\Widget.svelte'), 'Widget');
});
});

0 comments on commit 24c319f

Please sign in to comment.