@instructure/ui-avatar 9.2.1-snapshot-0 → 9.2.1-snapshot-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [9.2.1-snapshot-0](https://github.com/instructure/instructure-ui/compare/v9.2.0...v9.2.1-snapshot-0) (2024-07-09)
6
+ ## [9.2.1-snapshot-2](https://github.com/instructure/instructure-ui/compare/v9.2.0...v9.2.1-snapshot-2) (2024-07-10)
7
7
 
8
8
  **Note:** Version bump only for package @instructure/ui-avatar
9
9
 
package/README.md CHANGED
@@ -4,8 +4,8 @@ category: packages
4
4
 
5
5
  ## ui-avatar
6
6
 
7
- [![npm][npm]][npm-url] 
8
- [![MIT License][license-badge]][license] 
7
+ [![npm][npm]][npm-url]
8
+ [![MIT License][license-badge]][license]
9
9
  [![Code of Conduct][coc-badge]][coc]
10
10
 
11
11
  An image or letters that represents a user.
@@ -24,6 +24,7 @@ var _Avatar, _Avatar2, _Avatar3, _Avatar4, _Avatar5, _Avatar6, _svg, _Avatar7, _
24
24
  */
25
25
  import React from 'react';
26
26
  import { fireEvent, render, screen } from '@testing-library/react';
27
+ import { vi } from 'vitest';
27
28
  import { runAxeCheck } from '@instructure/ui-axe-check';
28
29
  import '@testing-library/jest-dom';
29
30
  import Avatar from '../index';
@@ -80,7 +81,7 @@ describe('<Avatar />', () => {
80
81
  expect(getComputedStyle(initials).color).toBe('rgb(3, 116, 181)');
81
82
  });
82
83
  it('should return the underlying component', async () => {
83
- const elementRef = jest.fn();
84
+ const elementRef = vi.fn();
84
85
  const _render4 = render( /*#__PURE__*/React.createElement(Avatar, {
85
86
  name: "Avatar Name",
86
87
  elementRef: elementRef
@@ -147,7 +148,7 @@ describe('<Avatar />', () => {
147
148
  expect(avatarImg).toHaveAttribute('src', src);
148
149
  });
149
150
  it('should call onImageLoaded once the image loads', async () => {
150
- const onImageLoaded = jest.fn();
151
+ const onImageLoaded = vi.fn();
151
152
  const _render10 = render( /*#__PURE__*/React.createElement(Avatar, {
152
153
  name: "Avatar Name",
153
154
  onImageLoaded: onImageLoaded
@@ -3,6 +3,7 @@
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
4
  var _react = _interopRequireDefault(require("react"));
5
5
  var _react2 = require("@testing-library/react");
6
+ var _vitest = require("vitest");
6
7
  var _runAxeCheck = require("@instructure/ui-axe-check/lib/runAxeCheck.js");
7
8
  require("@testing-library/jest-dom");
8
9
  var _index = _interopRequireDefault(require("../index"));
@@ -83,7 +84,7 @@ describe('<Avatar />', () => {
83
84
  expect(getComputedStyle(initials).color).toBe('rgb(3, 116, 181)');
84
85
  });
85
86
  it('should return the underlying component', async () => {
86
- const elementRef = jest.fn();
87
+ const elementRef = _vitest.vi.fn();
87
88
  const _render4 = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_index.default, {
88
89
  name: "Avatar Name",
89
90
  elementRef: elementRef
@@ -150,7 +151,7 @@ describe('<Avatar />', () => {
150
151
  expect(avatarImg).toHaveAttribute('src', src);
151
152
  });
152
153
  it('should call onImageLoaded once the image loads', async () => {
153
- const onImageLoaded = jest.fn();
154
+ const onImageLoaded = _vitest.vi.fn();
154
155
  const _render10 = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_index.default, {
155
156
  name: "Avatar Name",
156
157
  onImageLoaded: onImageLoaded
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-avatar",
3
- "version": "9.2.1-snapshot-0",
3
+ "version": "9.2.1-snapshot-2",
4
4
  "description": "An image or letters that represents a user.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,23 +24,24 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.24.5",
27
- "@instructure/emotion": "9.2.1-snapshot-0",
28
- "@instructure/shared-types": "9.2.1-snapshot-0",
29
- "@instructure/ui-icons": "9.2.1-snapshot-0",
30
- "@instructure/ui-react-utils": "9.2.1-snapshot-0",
31
- "@instructure/ui-testable": "9.2.1-snapshot-0",
32
- "@instructure/ui-view": "9.2.1-snapshot-0",
27
+ "@instructure/emotion": "9.2.1-snapshot-2",
28
+ "@instructure/shared-types": "9.2.1-snapshot-2",
29
+ "@instructure/ui-icons": "9.2.1-snapshot-2",
30
+ "@instructure/ui-react-utils": "9.2.1-snapshot-2",
31
+ "@instructure/ui-testable": "9.2.1-snapshot-2",
32
+ "@instructure/ui-view": "9.2.1-snapshot-2",
33
33
  "prop-types": "^15.8.1"
34
34
  },
35
35
  "devDependencies": {
36
- "@instructure/ui-axe-check": "9.2.1-snapshot-0",
37
- "@instructure/ui-babel-preset": "9.2.1-snapshot-0",
38
- "@instructure/ui-color-utils": "9.2.1-snapshot-0",
39
- "@instructure/ui-test-locator": "9.2.1-snapshot-0",
40
- "@instructure/ui-test-utils": "9.2.1-snapshot-0",
41
- "@instructure/ui-themes": "9.2.1-snapshot-0",
36
+ "@instructure/ui-axe-check": "9.2.1-snapshot-2",
37
+ "@instructure/ui-babel-preset": "9.2.1-snapshot-2",
38
+ "@instructure/ui-color-utils": "9.2.1-snapshot-2",
39
+ "@instructure/ui-test-locator": "9.2.1-snapshot-2",
40
+ "@instructure/ui-test-utils": "9.2.1-snapshot-2",
41
+ "@instructure/ui-themes": "9.2.1-snapshot-2",
42
42
  "@testing-library/jest-dom": "^6.4.5",
43
- "@testing-library/react": "^15.0.7"
43
+ "@testing-library/react": "^15.0.7",
44
+ "vitest": "^1.6.0"
44
45
  },
45
46
  "peerDependencies": {
46
47
  "react": ">=16.8 <=18"
@@ -23,6 +23,7 @@
23
23
  */
24
24
  import React from 'react'
25
25
  import { fireEvent, render, screen } from '@testing-library/react'
26
+ import { vi } from 'vitest'
26
27
  import { runAxeCheck } from '@instructure/ui-axe-check'
27
28
 
28
29
  import '@testing-library/jest-dom'
@@ -72,7 +73,7 @@ describe('<Avatar />', () => {
72
73
  })
73
74
 
74
75
  it('should return the underlying component', async () => {
75
- const elementRef = jest.fn()
76
+ const elementRef = vi.fn()
76
77
  const { container } = render(
77
78
  <Avatar name="Avatar Name" elementRef={elementRef} />
78
79
  )
@@ -137,7 +138,7 @@ describe('<Avatar />', () => {
137
138
  })
138
139
 
139
140
  it('should call onImageLoaded once the image loads', async () => {
140
- const onImageLoaded = jest.fn()
141
+ const onImageLoaded = vi.fn()
141
142
  const { container } = render(
142
143
  <Avatar name="Avatar Name" onImageLoaded={onImageLoaded} />
143
144
  )