Skip to content

Commit c8c0bdd

Browse files
committed
chore: yarn -> npm
1 parent 333baf3 commit c8c0bdd

File tree

8 files changed

+13633
-4869
lines changed

8 files changed

+13633
-4869
lines changed

.circleci/config.yml

+4-13
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,24 @@ defaults: &defaults
66
- image: cimg/node:lts
77
commands:
88
install_deps:
9-
description: Install dependencies (from cache, if possible)
9+
description: Install dependencies
1010
steps:
1111
- checkout
12-
- restore_cache:
13-
keys:
14-
# when lock file changes, use increasingly general patterns to restore cache
15-
- yarn-{{ checksum "yarn.lock" }}
16-
- yarn-
17-
- run: yarn --frozen-lockfile
18-
- save_cache:
19-
paths:
20-
- ~/.cache/yarn
21-
key: yarn-{{ checksum "yarn.lock" }}
12+
- run: npm ci
2213
jobs:
2314
test:
2415
<<: *defaults
2516
steps:
2617
- install_deps
27-
- run: yarn build
18+
- run: npm run build
2819
- run: ./node_modules/.bin/jest --runInBand --ci
2920
- store_test_results:
3021
path: reports
3122
release:
3223
<<: *defaults
3324
steps:
3425
- install_deps
35-
- run: yarn build
26+
- run: npm run build
3627
- run: npx semantic-release
3728
workflows:
3829
version: 2

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ node_modules/
44
*.log
55
*.tgz
66
dist/
7-
package-lock.json
87
coverage/
9-
reports/
8+
reports/

.npmrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
package-lock=false
1+
audit=false
2+
fund=false

__tests__/icon.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,28 @@ describe('Icon', () => {
2020
icon = mount(WrappedIcon);
2121
});
2222

23-
it('accepts a "title" property', () => {
23+
it('accepts a "title" property', async () => {
2424
expect(icon.attributes()['aria-label']).toEqual('Android icon');
2525

26-
icon.setProps({ title: 'foo' });
26+
await icon.setProps({ title: 'foo' });
2727

2828
expect(icon.attributes()['aria-label']).toEqual('foo');
2929
});
3030

31-
it('accepts a "decorative" property', () => {
31+
it('accepts a "decorative" property', async () => {
3232
expect(icon.attributes()['aria-hidden']).toBeFalsy();
3333

34-
icon.setProps({ decorative: true });
34+
await icon.setProps({ decorative: true });
3535

3636
expect(icon.attributes()['aria-hidden']).toBeTruthy();
3737
});
3838

39-
it('accepts a "fillColor" property', () => {
39+
it('accepts a "fillColor" property', async () => {
4040
const svg = icon.find('.material-design-icon__svg');
4141

4242
expect(svg.attributes()['fill']).toEqual('currentColor');
4343

44-
icon.setProps({ fillColor: '#FF0000' });
44+
await icon.setProps({ fillColor: '#FF0000' });
4545

4646
expect(svg.attributes()['fill']).toEqual('#FF0000');
4747
});
@@ -50,7 +50,7 @@ describe('Icon', () => {
5050
expect(icon).toMatchSnapshot();
5151
});
5252

53-
it('listens to a click event', () => {
53+
it('listens to a click event', async () => {
5454
const clickListener = jest.fn();
5555
const iconWithEvent = mount({
5656
name: 'IconWithEvent',
@@ -65,7 +65,7 @@ describe('Icon', () => {
6565
},
6666
});
6767

68-
iconWithEvent.trigger('click');
68+
await iconWithEvent.trigger('click');
6969
expect(clickListener).toBeCalled();
7070
});
7171
});

jest.config.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
module.exports = {
22
verbose: true,
3+
testEnvironment: 'jsdom',
34
moduleFileExtensions: ['js', 'vue'],
45
transform: {
56
'^.+\\.vue$': 'vue-jest',
67
'^.+\\.js$': '<rootDir>/node_modules/babel-jest',
78
},
89
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
9-
reporters: [
10-
'default',
11-
['jest-junit', { outputDirectory: '<rootDir>/reports/jest' }],
12-
],
1310
};

0 commit comments

Comments
 (0)