Revert "fix(compiler): Pretty print object instead of [Object object] (#22689)" (#23442)

This reverts commit 8555a3a3cd.

Reverted because of https://github.com/angular/angular/issues/23440

PR Close #23442
This commit is contained in:
Victor Berchet
2018-04-18 17:09:41 -07:00
parent acf6781ccc
commit 1d1e75ee2b
4 changed files with 7 additions and 42 deletions

View File

@ -7,8 +7,7 @@
*/
import {fakeAsync} from '@angular/core/testing/src/fake_async';
import {SyncAsync, escapeRegExp, splitAtColon, stringify, utf8Encode} from '../src/util';
import {SyncAsync, escapeRegExp, splitAtColon, utf8Encode} from '../src/util';
{
describe('util', () => {
@ -76,23 +75,5 @@ import {SyncAsync, escapeRegExp, splitAtColon, stringify, utf8Encode} from '../s
([input, output]: [string, string]) => { expect(utf8Encode(input)).toEqual(output); });
});
});
describe('stringify', () => {
it('should pretty print an Object', () => {
const result = stringify({hello: 'world'});
expect(result).toBe('{"hello":"world"}');
});
it('should truncate large object', () => {
const result = stringify({
selector: 'app-root',
preserveWhitespaces: false,
templateUrl: './app.component.ng.html',
styleUrls: ['./app.component.css']
});
expect(result).toBe(
'{"selector":"app-root","preserveWhitespaces":false,"templateUrl":"./app.component.ng.html","styleUrl...');
});
});
});
}
}