2017-03-07 07:31:28 +00:00
|
|
|
/**
|
|
|
|
|
* @license
|
2020-05-19 19:08:49 +00:00
|
|
|
* Copyright Google LLC All Rights Reserved.
|
2017-03-07 07:31:28 +00:00
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
2024-09-20 15:23:15 +00:00
|
|
|
* found in the LICENSE file at https://angular.dev/license
|
2017-03-07 07:31:28 +00:00
|
|
|
*/
|
|
|
|
|
|
2019-01-09 21:49:16 +00:00
|
|
|
import {stringify} from '../src/util/stringify';
|
2017-03-07 07:31:28 +00:00
|
|
|
|
2023-10-17 09:45:16 +00:00
|
|
|
describe('stringify', () => {
|
|
|
|
|
it('should return string undefined when toString returns undefined', () =>
|
|
|
|
|
expect(stringify({toString: (): any => undefined})).toBe('undefined'));
|
2017-03-07 07:31:28 +00:00
|
|
|
|
2023-10-17 09:45:16 +00:00
|
|
|
it('should return string null when toString returns null', () =>
|
|
|
|
|
expect(stringify({toString: (): any => null})).toBe('null'));
|
|
|
|
|
});
|