/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/compiler-cli/linker/test/fatal_linker_error_spec.ts
30 строк
970 B
Joey Perrott
refactor: update license text to point to angular.dev (#57901)
24 сен 2024, 16:33
24 сен 2024, 16:33
9dbe6fc
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {FatalLinkerError, isFatalLinkerError} from '../src/fatal_linker_error'; describe('FatalLinkerError', () => { it('should expose the `node` and `message`', () => { const node = {}; expect(new FatalLinkerError(node, 'Some message')).toEqual( jasmine.objectContaining({node, message: 'Some message'}), ); }); }); describe('isFatalLinkerError()', () => { it('should return true if the error is of type `FatalLinkerError`', () => { const error = new FatalLinkerError({}, 'Some message'); expect(isFatalLinkerError(error)).toBe(true); }); it('should return false if the error is not of type `FatalLinkerError`', () => { const error = new Error('Some message'); expect(isFatalLinkerError(error)).toBe(false); }); });