2017-03-07 02:31:28 -05:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. 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.io/license
|
|
|
|
*/
|
|
|
|
|
|
|
|
import {stringify} from '../src/util';
|
|
|
|
|
|
|
|
export function main() {
|
|
|
|
describe('stringify', () => {
|
|
|
|
it('should return string undefined when toString returns undefined',
|
2017-03-29 12:34:45 -04:00
|
|
|
() => expect(stringify({toString: (): any => undefined})).toBe('undefined'));
|
2017-03-07 02:31:28 -05:00
|
|
|
|
|
|
|
it('should return string null when toString returns null',
|
2017-03-29 12:34:45 -04:00
|
|
|
() => expect(stringify({toString: (): any => null})).toBe('null'));
|
2017-03-07 02:31:28 -05:00
|
|
|
});
|
|
|
|
}
|