[FEATURE] Add possibility to write tests in TypeScript
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Tests / TypeScript / BackendExceptionTest.ts
1 /*
2 * This file is part of the TYPO3 CMS project.
3 *
4 * It is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU General Public License, either version 2
6 * of the License, or any later version.
7 *
8 * For the full copyright and license information, please read the
9 * LICENSE.txt file that was distributed with this source code.
10 *
11 * The TYPO3 project - inspiring people to share!
12 */
13
14 import {BackendException} from 'TYPO3/CMS/Backend/BackendException';
15
16 describe('TYPO3/CMS/Backend/BackendException', () => {
17 it('sets exception message', () => {
18 const backendException = new BackendException('some message');
19 expect(backendException.message).toBe('some message');
20 });
21
22 it('sets exception code', () => {
23 const backendException = new BackendException('', 12345);
24 expect(backendException.code).toBe(12345);
25 });
26 });