upgrade vitest
also: - more tests passing in vitests - specifies which folders are left to resolve in the vitest config test plan: - build passes Change-Id: I34fee1a8b44101fec4b801fa6f67b9562df0425c Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335009 Reviewed-by: Cameron Ray <cameron.ray@instructure.com> QA-Review: Cameron Ray <cameron.ray@instructure.com> Product-Review: Cameron Ray <cameron.ray@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
This commit is contained in:
parent
1abaa6fb1b
commit
d6b0d0818a
|
@ -104,6 +104,7 @@
|
|||
"@types/react-dnd": "2.0.36",
|
||||
"@types/twitter-text": "^3.1.2",
|
||||
"@types/uuid": "^9.0.0",
|
||||
"@vitest/coverage-v8": "^1.0.4",
|
||||
"apollo-cache": "^1.3.2",
|
||||
"apollo-cache-inmemory": "^1.6.3",
|
||||
"apollo-cache-persist": "^0.1.1",
|
||||
|
@ -350,7 +351,7 @@
|
|||
"tinymce": "^5",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^5.3.2",
|
||||
"vitest": "^0.33.0",
|
||||
"vitest": "^1.0.4",
|
||||
"waait": "^1",
|
||||
"webpack": "^5",
|
||||
"webpack-bundle-analyzer": "^4.5.0",
|
||||
|
|
|
@ -23,7 +23,7 @@ import ready from '@instructure/ready'
|
|||
|
||||
import {AccountCalendarSettings} from './react/components/AccountCalendarSettings'
|
||||
import type {EnvAccountsAdminTools} from '@canvas/global/env/EnvAccounts'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv.d'
|
||||
|
||||
// Allow unchecked access to module-specific ENV variables
|
||||
declare const ENV: GlobalEnv & EnvAccountsAdminTools
|
||||
|
|
|
@ -22,7 +22,7 @@ import {ApolloProvider, createClient} from '@canvas/apollo'
|
|||
import {useScope as useI18nScope} from '@canvas/i18n'
|
||||
import LoadingIndicator from '@canvas/loading-indicator'
|
||||
import {AccountStatusManagement} from '../components/account_grading_status/AccountStatusManagement'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv.d'
|
||||
|
||||
const I18n = useI18nScope('account_grading_status')
|
||||
|
||||
|
|
|
@ -96,12 +96,12 @@ describe('BBBModalOptions', () => {
|
|||
})
|
||||
|
||||
it('should render with default props', () => {
|
||||
const container = setup(defaultProps)
|
||||
expect(container.getByLabelText('Name')).toHaveValue(defaultProps.name)
|
||||
expect(container.getByLabelText('Duration in Minutes')).toHaveValue('')
|
||||
expect(container.getByLabelText('Enable recording for this conference').checked).toBeTruthy()
|
||||
expect(container.getByLabelText('Enable recording for this conference').disabled).toBeFalsy()
|
||||
expect(container.getByLabelText('Description')).toHaveValue(defaultProps.description)
|
||||
const {getByLabelText, getAllByLabelText} = setup(defaultProps)
|
||||
expect(getByLabelText('Name')).toHaveValue(defaultProps.name)
|
||||
expect(getAllByLabelText('Duration in Minutes')[0]).toHaveValue('')
|
||||
expect(getByLabelText('Enable recording for this conference').checked).toBeTruthy()
|
||||
expect(getByLabelText('Enable recording for this conference').disabled).toBeFalsy()
|
||||
expect(getByLabelText('Description')).toHaveValue(defaultProps.description)
|
||||
})
|
||||
|
||||
it('should render attendees tab', () => {
|
||||
|
|
|
@ -73,14 +73,12 @@ describe('BaseModalOptions', () => {
|
|||
})
|
||||
|
||||
it('should render with default props', () => {
|
||||
const container = setup(defaultProps)
|
||||
expect(container.getByLabelText('Name')).toHaveValue(defaultProps.name)
|
||||
expect(container.getByLabelText('Duration in Minutes')).toHaveValue(
|
||||
const {getByLabelText, getAllByLabelText} = setup(defaultProps)
|
||||
expect(getByLabelText('Name')).toHaveValue(defaultProps.name)
|
||||
expect(getAllByLabelText('Duration in Minutes')[0]).toHaveValue(
|
||||
defaultProps.duration.toString()
|
||||
)
|
||||
expect(
|
||||
container.getByLabelText('No time limit (for long-running conferences)').checked
|
||||
).toBeFalsy()
|
||||
expect(container.getByLabelText('Description')).toHaveValue(defaultProps.description)
|
||||
expect(getByLabelText('No time limit (for long-running conferences)').checked).toBeFalsy()
|
||||
expect(getByLabelText('Description')).toHaveValue(defaultProps.description)
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// @vitest-environment jsdom
|
||||
/*
|
||||
* Copyright (C) 2022 - present Instructure, Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// @vitest-environment jsdom
|
||||
/*
|
||||
* Copyright (C) 2022 - present Instructure, Inc.
|
||||
*
|
||||
|
|
|
@ -39,7 +39,7 @@ import {actions as blackoutDateActions} from '../../../shared/actions/blackout_d
|
|||
import {getBlackoutDates} from '../../../shared/reducers/blackout_dates'
|
||||
import {getResponsiveSize, getSyncing} from '../../../reducers/ui'
|
||||
import {EnvCoursePaces} from '@canvas/global/env/EnvCoursePaces'
|
||||
import {GlobalEnv} from '@canvas/global/env/GlobalEnv'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv.d'
|
||||
|
||||
import type {ButtonProps} from '@instructure/ui-buttons'
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ import {useScope as useI18nScope} from '@canvas/i18n'
|
|||
|
||||
import {Checkbox} from '@instructure/ui-checkbox'
|
||||
import {FormField} from '@instructure/ui-form-field'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv.d'
|
||||
|
||||
declare const ENV: GlobalEnv & {
|
||||
SIS_NAME: string
|
||||
|
|
|
@ -23,7 +23,7 @@ import MessageStudentsWhoDialog, {
|
|||
type SendMessageArgs,
|
||||
type Student,
|
||||
} from '@canvas/message-students-dialog/react/MessageStudentsWhoDialog'
|
||||
import type {CamelizedAssignment} from '@canvas/grading/grading'
|
||||
import type {CamelizedAssignment} from '@canvas/grading/grading.d'
|
||||
import type {
|
||||
AssignmentConnection,
|
||||
GradebookOptions,
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
import $ from 'jquery'
|
||||
import React from 'react'
|
||||
import {render} from '@testing-library/react'
|
||||
import AssignmentInformation, {type AssignmentInformationComponentProps} from '..'
|
||||
import AssignmentInformation from '../index'
|
||||
import type {AssignmentInformationComponentProps} from '../index'
|
||||
import {assignmentInfoDefaultProps, defaultAssignment} from './fixtures'
|
||||
|
||||
describe('Assignment Information Tests', () => {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// @vitest-environment jsdom
|
||||
/*
|
||||
* Copyright (C) 2023 - present Instructure, Inc.
|
||||
*
|
||||
|
|
|
@ -21,7 +21,7 @@ import type {
|
|||
AssignmentGroupCriteriaMap,
|
||||
AssignmentGroupGradeMap,
|
||||
DeprecatedGradingScheme,
|
||||
} from '@canvas/grading/grading'
|
||||
} from '@canvas/grading/grading.d'
|
||||
import RowScore from './RowScore'
|
||||
|
||||
type Props = {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
import {View} from '@instructure/ui-view'
|
||||
import React, {useState} from 'react'
|
||||
import {useScope as useI18nScope} from '@canvas/i18n'
|
||||
import type {DeprecatedGradingScheme, FinalGradeOverride} from '@canvas/grading/grading'
|
||||
import type {DeprecatedGradingScheme, FinalGradeOverride} from '@canvas/grading/grading.d'
|
||||
import {updateFinalGradeOverride} from '@canvas/grading/FinalGradeOverrideApi'
|
||||
import {ApiCallStatus} from '../../../types'
|
||||
import {FinalGradeOverrideTextBox} from '@canvas/final-grade-override'
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react'
|
||||
import type {GradingPeriodGrade, DeprecatedGradingScheme} from '@canvas/grading/grading'
|
||||
import type {GradingPeriodGrade, DeprecatedGradingScheme} from '@canvas/grading/grading.d'
|
||||
import type {GradingPeriodSet} from '../../../../../api.d'
|
||||
import RowScore from './RowScore'
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react'
|
||||
import type {DeprecatedGradingScheme} from '@canvas/grading/grading'
|
||||
import type {DeprecatedGradingScheme} from '@canvas/grading/grading.d'
|
||||
import GradeFormatHelper from '@canvas/grading/GradeFormatHelper'
|
||||
import {useScope as useI18nScope} from '@canvas/i18n'
|
||||
import {getLetterGrade, scoreToPercentage, scoreToScaledPoints} from '../../../utils/gradebookUtils'
|
||||
|
|
|
@ -24,7 +24,7 @@ import type {
|
|||
AssignmentGroupCriteriaMap,
|
||||
FinalGradeOverrideMap,
|
||||
FinalGradeOverride,
|
||||
} from '@canvas/grading/grading'
|
||||
} from '@canvas/grading/grading.d'
|
||||
import {useScope as useI18nScope} from '@canvas/i18n'
|
||||
import {showFlashError} from '@canvas/alerts/react/FlashAlert'
|
||||
import {Text} from '@instructure/ui-text'
|
||||
|
|
|
@ -16,14 +16,14 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {DeprecatedGradingScheme, ProgressData} from '@canvas/grading/grading'
|
||||
import {DeprecatedGradingScheme, ProgressData} from '@canvas/grading/grading.d'
|
||||
import {GradingStandard} from '@instructure/grading-utils'
|
||||
import {
|
||||
AssignmentConnection,
|
||||
UserConnection,
|
||||
GradebookUserSubmissionDetails,
|
||||
SubmissionConnection,
|
||||
} from './queries'
|
||||
} from './queries.d'
|
||||
import {GradingPeriod, GradingPeriodSet} from '../../../api.d'
|
||||
|
||||
export enum GradebookSortOrder {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {GradingType, WorkflowState} from '../../../api'
|
||||
import type {GradingType, WorkflowState} from '../../../api.d'
|
||||
|
||||
export type UserConnection = {
|
||||
enrollments: {
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
*/
|
||||
|
||||
import _ from 'lodash'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv.d'
|
||||
import type {
|
||||
AssignmentGroupCriteriaMap,
|
||||
CamelizedGradingPeriodSet,
|
||||
SubmissionGradeCriteria,
|
||||
} from '@canvas/grading/grading'
|
||||
} from '@canvas/grading/grading.d'
|
||||
import {useScope as useI18nScope} from '@canvas/i18n'
|
||||
import round from '@canvas/round'
|
||||
import tz from '@canvas/timezone'
|
||||
|
|
|
@ -29,7 +29,7 @@ import {useScope as useI18nScope} from '@canvas/i18n'
|
|||
import Layout from './Layout'
|
||||
import {setAssignmentPostPolicy} from './Api'
|
||||
import {showFlashAlert} from '@canvas/alerts/react/FlashAlert'
|
||||
import {CamelizedAssignment} from '@canvas/grading/grading'
|
||||
import type {CamelizedAssignment} from '@canvas/grading/grading.d'
|
||||
|
||||
const I18n = useI18nScope('post_grades_tray')
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import type {FinalGradeOverrideMap} from '@canvas/grading/grading'
|
||||
import type {FinalGradeOverrideMap} from '@canvas/grading/grading.d'
|
||||
|
||||
export const gradeOverrideCustomStatus = (
|
||||
finalGradeOverrides: FinalGradeOverrideMap,
|
||||
|
|
|
@ -243,7 +243,7 @@ import {ProgressBar} from '@instructure/ui-progress'
|
|||
import GradebookExportManager from '../shared/GradebookExportManager'
|
||||
import {handleExternalContentMessages} from '@canvas/external-tools/messages'
|
||||
import type {EnvGradebookCommon} from '@canvas/global/env/EnvGradebook'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv.d'
|
||||
import {TotalGradeOverrideTrayProvider} from './components/TotalGradeOverrideTray'
|
||||
|
||||
const I18n = useI18nScope('gradebook')
|
||||
|
|
|
@ -23,7 +23,7 @@ import GradeOverrideEntry from '@canvas/grading/GradeEntry/GradeOverrideEntry'
|
|||
import GradeOverrideInfo from '@canvas/grading/GradeEntry/GradeOverrideInfo'
|
||||
import FinalGradeOverrides from '../../../../FinalGradeOverrides/index'
|
||||
import TotalGradeOverrideCellPropFactory from '../TotalGradeOverrideCellPropFactory'
|
||||
import {DeprecatedGradingScheme} from '@canvas/grading/grading'
|
||||
import type {DeprecatedGradingScheme} from '@canvas/grading/grading.d'
|
||||
import useStore from '../../../../stores'
|
||||
|
||||
const mockTotalGradeOverrideStore = (state = {}) => {
|
||||
|
|
|
@ -20,7 +20,7 @@ import round from '@canvas/round'
|
|||
import I18n from '@canvas/i18n'
|
||||
import {scoreToPercentage, scoreToScaledPoints} from '@canvas/grading/GradeCalculationHelper'
|
||||
import Gradebook from '../../Gradebook'
|
||||
import type {DeprecatedGradingScheme} from '@canvas/grading/grading'
|
||||
import type {DeprecatedGradingScheme} from '@canvas/grading/grading.d'
|
||||
|
||||
function getGradePercentage(score: number, pointsPossible: number) {
|
||||
const grade = scoreToPercentage(score, pointsPossible)
|
||||
|
|
|
@ -26,7 +26,7 @@ import htmlEscape from 'html-escape'
|
|||
import listFormatterPolyfill from '@canvas/util/listFormatter'
|
||||
import type Gradebook from '../../Gradebook'
|
||||
import type {Assignment} from '../../../../../../api.d'
|
||||
import type {DeprecatedGradingScheme} from '@canvas/grading/grading'
|
||||
import type {DeprecatedGradingScheme} from '@canvas/grading/grading.d'
|
||||
import GradeFormatHelper from '@canvas/grading/GradeFormatHelper'
|
||||
|
||||
const I18n = useI18nScope('gradebook')
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// @vitest-environment jsdom
|
||||
/*
|
||||
* Copyright (C) 2018 - present Instructure, Inc.
|
||||
*
|
||||
|
|
|
@ -147,7 +147,7 @@ import 'jquery-scroll-to-visible/jquery.scrollTo'
|
|||
import 'jquery-selectmenu'
|
||||
import '@canvas/jquery/jquery.disableWhileLoading'
|
||||
import '@canvas/util/jquery/fixDialogButtons'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv.d'
|
||||
import type {EnvGradebookSpeedGrader} from '@canvas/global/env/EnvGradebook'
|
||||
import replaceTags from '@canvas/util/replaceTags'
|
||||
import type {GradeStatusUnderscore} from '@canvas/grading/accountGradingStatus'
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
import {sendMessageStudentsWho} from './shared/grading/messageStudentsWhoHelper'
|
||||
import {GlobalEnv} from '@canvas/global/env/GlobalEnv'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv.d'
|
||||
import {GlobalInst} from '@canvas/global/inst/GlobalInst'
|
||||
|
||||
declare global {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// @vitest-environment jsdom
|
||||
/*
|
||||
* Copyright (C) 2022 - present Instructure, Inc.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// @vitest-environment jsdom
|
||||
/*
|
||||
* Copyright (C) 2022 - present Instructure, Inc.
|
||||
*
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
import React, {PropsWithChildren, ReactElement} from 'react'
|
||||
import * as Sentry from '@sentry/react'
|
||||
import {FallbackRender} from '@sentry/react/dist/errorboundary'
|
||||
import {FallbackRender} from '@sentry/react/types/errorboundary.d'
|
||||
|
||||
export type ErrorBoundaryProps = PropsWithChildren<{
|
||||
errorComponent: FallbackRender | ReactElement
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
import React from 'react'
|
||||
import {FinalGradeOverrideTextBox, type FinalGradeOverrideTextBoxProps} from '../react'
|
||||
import {fireEvent, render} from '@testing-library/react'
|
||||
import type {DeprecatedGradingScheme} from '@canvas/grading/grading'
|
||||
import type {DeprecatedGradingScheme} from '@canvas/grading/grading.d'
|
||||
|
||||
const gradingScheme: DeprecatedGradingScheme = {
|
||||
data: [
|
||||
|
|
|
@ -22,7 +22,7 @@ import type {
|
|||
DeprecatedGradingScheme,
|
||||
FinalGradeOverride,
|
||||
GradeEntryOptions,
|
||||
} from '@canvas/grading/grading'
|
||||
} from '@canvas/grading/grading.d'
|
||||
import {TextInput} from '@instructure/ui-text-input'
|
||||
import {ScreenReaderContent} from '@instructure/ui-a11y-content'
|
||||
import GradeOverrideEntry from '@canvas/grading/GradeEntry/GradeOverrideEntry'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// @vitest-environment jsdom
|
||||
/*
|
||||
* Copyright (C) 2018 - present Instructure, Inc.
|
||||
*
|
||||
|
|
|
@ -23,7 +23,7 @@ import {scoreToGrade} from '@instructure/grading-utils'
|
|||
import numberHelper from '@canvas/i18n/numberHelper'
|
||||
import type {GradeInput, GradeResult} from './grading.d'
|
||||
import {EnvGradebookCommon} from '@canvas/global/env/EnvGradebook'
|
||||
import {GlobalEnv} from '@canvas/global/env/GlobalEnv'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv.d'
|
||||
|
||||
// Allow unchecked access to ENV variables that should exist in this context
|
||||
declare const ENV: GlobalEnv & EnvGradebookCommon
|
||||
|
|
|
@ -25,7 +25,7 @@ import gradingPeriodsApi from './gradingPeriodsApi'
|
|||
import type {CamelizedGradingPeriodSet} from '@canvas/grading/grading.d'
|
||||
import type {GradingPeriodSet, GradingPeriodSetGroup} from 'api.d'
|
||||
import {EnvGradingStandardsCommon} from '@canvas/global/env/EnvGradingStandards'
|
||||
import {GlobalEnv} from '@canvas/global/env/GlobalEnv'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv.d'
|
||||
import replaceTags from '@canvas/util/replaceTags'
|
||||
|
||||
// Allow unchecked access to ENV variables that should exist in this context
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// @vitest-environment jsdom
|
||||
/*
|
||||
* Copyright (C) 2019 - present Instructure, Inc.
|
||||
*
|
||||
|
|
|
@ -21,7 +21,7 @@ import {useMutation} from 'react-apollo'
|
|||
import {CREATE_SUBMISSION} from '@canvas/assignments/graphql/student/Mutations'
|
||||
import axios from '@canvas/axios'
|
||||
import {useScope as useI18nScope} from '@canvas/i18n'
|
||||
import type {CamelizedAssignment} from '@canvas/grading/grading'
|
||||
import type {CamelizedAssignment} from '@canvas/grading/grading.d'
|
||||
import {getFileThumbnail} from '@canvas/util/fileHelper'
|
||||
import {uploadFile} from '@canvas/upload-file'
|
||||
import theme from '@instructure/canvas-theme'
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {type GlobalEnv} from '@canvas/global/env/GlobalEnv'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv.d'
|
||||
|
||||
export enum Feature {
|
||||
IconMaker,
|
||||
|
|
|
@ -46,7 +46,7 @@ import type {DeepLinkResponse} from '@canvas/deep-linking/DeepLinkResponse'
|
|||
import {contentItemProcessorPrechecks} from '@canvas/deep-linking/ContentItemProcessor'
|
||||
import type {ResourceLinkContentItem} from '@canvas/deep-linking/models/ResourceLinkContentItem'
|
||||
import type {EnvContextModules} from '@canvas/global/env/EnvContextModules'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv.d'
|
||||
import replaceTags from '@canvas/util/replaceTags'
|
||||
|
||||
// @ts-expect-error
|
||||
|
|
|
@ -54,7 +54,7 @@ import type {
|
|||
User,
|
||||
} from './types'
|
||||
import {showFlashError} from '@canvas/alerts/react/FlashAlert'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv.d'
|
||||
import type {EnvCommon} from '@canvas/global/env/EnvCommon'
|
||||
import {TempEnrollAvatar} from './TempEnrollAvatar'
|
||||
import {
|
||||
|
|
|
@ -32,7 +32,7 @@ import {createAnalyticPropsGenerator} from './util/analytics'
|
|||
import {TempEnrollAvatar} from './TempEnrollAvatar'
|
||||
import {EMPTY_USER, MODULE_NAME} from './types'
|
||||
import type {User} from './types'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv.d'
|
||||
|
||||
declare const ENV: GlobalEnv
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ import {TempEnrollModal} from './TempEnrollModal'
|
|||
import {createAnalyticPropsGenerator} from './util/analytics'
|
||||
import {View} from '@instructure/ui-view'
|
||||
import {Text} from '@instructure/ui-text'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv'
|
||||
import type {GlobalEnv} from '@canvas/global/env/GlobalEnv.d'
|
||||
import type {EnvCommon} from '@canvas/global/env/EnvCommon'
|
||||
|
||||
declare const ENV: GlobalEnv & EnvCommon
|
||||
|
|
103
vitest.config.ts
103
vitest.config.ts
|
@ -28,8 +28,109 @@ export default defineConfig({
|
|||
globals: true,
|
||||
setupFiles: 'ui/setup-vitests.tsx',
|
||||
include: ['ui/**/__tests__/**/*.test.?(c|m)[jt]s?(x)'],
|
||||
exclude: [
|
||||
'ui/boot/initializers/**/*',
|
||||
'ui/features/account_calendar_settings/**/*',
|
||||
'ui/features/account_course_user_search/**/*',
|
||||
'ui/features/account_grading_settings/**/*',
|
||||
'ui/features/account_notification_settings/**/*',
|
||||
'ui/features/account_settings/**/*',
|
||||
'ui/features/assignment_edit/**/*',
|
||||
'ui/features/assignment_grade_summary/**/*',
|
||||
'ui/features/assignment_index/**/*',
|
||||
'ui/features/assignments_show_student/**/*',
|
||||
'ui/features/assignments_show_teacher/**/*',
|
||||
'ui/features/brand_configs/**/*',
|
||||
'ui/features/calendar/**/*',
|
||||
'ui/features/conferences/**/*',
|
||||
'ui/features/content_migrations/**/*',
|
||||
'ui/features/content_shares/**/*',
|
||||
'ui/features/course_paces/**/*',
|
||||
'ui/features/course_people/**/*',
|
||||
'ui/features/course_settings/**/*',
|
||||
'ui/features/dashboard/**/*',
|
||||
'ui/features/developer_keys_v2/**/*',
|
||||
'ui/features/discussion_topic_edit_v2/**/*',
|
||||
'ui/features/discussion_topics_post/**/*',
|
||||
'ui/features/discussion_topics/**/*',
|
||||
'ui/features/edit_calendar_event/**/*',
|
||||
'ui/features/enhanced_individual_gradebook/**/*',
|
||||
'ui/features/external_apps/**/*',
|
||||
'ui/features/files/**/*',
|
||||
'ui/features/grade_summary/**/*',
|
||||
'ui/features/gradebook_history/**/*',
|
||||
'ui/features/gradebook/**/*',
|
||||
'ui/features/inbox/**/*',
|
||||
'ui/features/job_stats/**/*',
|
||||
'ui/features/jobs_v2/**/*',
|
||||
'ui/features/k5_course/**/*',
|
||||
'ui/features/k5_dashboard/**/*',
|
||||
'ui/features/learning_mastery_v2/**/*',
|
||||
'ui/features/navigation_header/**/*',
|
||||
'ui/features/outcome_management/**/*',
|
||||
'ui/features/permissions/**/*',
|
||||
'ui/features/post_message_forwarding/**/*',
|
||||
'ui/features/quiz_log_auditing/**/*',
|
||||
'ui/features/quiz_statistics/**/*',
|
||||
'ui/features/quizzes_index/**/*',
|
||||
'ui/features/rubrics/**/*',
|
||||
'ui/features/speed_grader/**/*',
|
||||
'ui/features/submit_assignment/**/*',
|
||||
'ui/features/syllabus/**/*',
|
||||
'ui/shared/apollo-v3/**/*',
|
||||
'ui/shared/apollo/**/*',
|
||||
'ui/shared/assignments/**/*',
|
||||
'ui/shared/brandable-css/**/*',
|
||||
'ui/shared/calendar-conferences/**/*',
|
||||
'ui/shared/calendar/**/*',
|
||||
'ui/shared/canvas-media-player/**/*',
|
||||
'ui/shared/context-module-file-drop/**/*',
|
||||
'ui/shared/context-modules/**/*',
|
||||
'ui/shared/copy-to-clipboard/**/*',
|
||||
'ui/shared/dashboard-card/**/*',
|
||||
'ui/shared/datetime/**/*',
|
||||
'ui/shared/deep-linking/**/*',
|
||||
'ui/shared/differentiated-modules/**/*',
|
||||
'ui/shared/direct-sharing/**/*',
|
||||
'ui/shared/discussions/**/*',
|
||||
'ui/shared/error-boundary/**/*',
|
||||
'ui/shared/external-tools/**/*',
|
||||
'ui/shared/feature-flags/**/*',
|
||||
'ui/shared/files/**/*',
|
||||
'ui/shared/final-grade-override/**/*',
|
||||
'ui/shared/generic-error-page/**/*',
|
||||
'ui/shared/grade-summary/**/*',
|
||||
'ui/shared/grading_scheme/**/*',
|
||||
'ui/shared/grading/**/*',
|
||||
'ui/shared/graphql-query-mock/**/*',
|
||||
'ui/shared/group-modal/**/*',
|
||||
'ui/shared/immersive-reader/**/*', // fails inline snapshot
|
||||
'ui/shared/integrations/**/*',
|
||||
'ui/shared/k5/**/*',
|
||||
'ui/shared/mediaelement/**/*',
|
||||
'ui/shared/message-attachments/**/*',
|
||||
'ui/shared/message-students-dialog/**/*',
|
||||
'ui/shared/message-students-modal/**/*',
|
||||
'ui/shared/network/**/*',
|
||||
'ui/shared/notification-preferences-course/**/*',
|
||||
'ui/shared/outcome-content-viewer/**/*',
|
||||
'ui/shared/outcomes/**/*',
|
||||
'ui/shared/planner/**/*',
|
||||
'ui/shared/publish-button-view/**/*',
|
||||
'ui/shared/rce/**/*',
|
||||
'ui/shared/rubrics/**/*',
|
||||
'ui/shared/search-item-selector/**/*',
|
||||
'ui/shared/submission-sticker/**/*',
|
||||
'ui/shared/temporary-enrollment/**/*',
|
||||
'ui/shared/tinymce-external-tools/**/*',
|
||||
'ui/shared/use-state-with-callback-hook/**/*',
|
||||
'ui/shared/wiki/**/*',
|
||||
'ui/shared/with-breakpoints/**/*',
|
||||
],
|
||||
coverage: {
|
||||
provider: 'istanbul',
|
||||
include: ['ui/**/*.ts?(x)', 'ui/**/*.js?(x)'],
|
||||
exclude: ['ui/**/__tests__/**/*'],
|
||||
reportOnFailure: true,
|
||||
},
|
||||
},
|
||||
plugins: [handlebarsPlugin(), svgPlugin()],
|
||||
|
|
Loading…
Reference in New Issue