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