chore(ngdocs): disable code prettification in e2e tests

code prettification is expensive and not needed for e2e tests, so I'm disabling
it to speed up the e2e test suite.

this is a temporary measure, see previous commit for more info.
This commit is contained in:
Igor Minar
2013-08-16 10:53:18 -07:00
parent 00f784cda8
commit 705404ff8e
2 changed files with 7 additions and 2 deletions

View File

@@ -102,7 +102,12 @@ directive.prettyprint = ['reindentCode', function(reindentCode) {
//ensure that angular won't compile {{ curly }} values
html = html.replace(/\{\{/g, '<span>{{</span>')
.replace(/\}\}/g, '<span>}}</span>');
element.html(window.prettyPrintOne(reindentCode(html), undefined, true));
if (window.RUNNING_IN_NG_TEST_RUNNER) {
element.html(html);
}
else {
element.html(window.prettyPrintOne(reindentCode(html), undefined, true));
}
}
};
}];

View File

@@ -54,8 +54,8 @@
addTag('script', {src: path('angular-animate.js') }, sync);
addTag('script', {src: 'components/angular-bootstrap.js' }, sync);
addTag('script', {src: 'components/angular-bootstrap-prettify.js' }, sync);
addTag('script', {src: 'components/google-code-prettify.js' }, sync);
if (!window.RUNNING_IN_NG_TEST_RUNNER) {
addTag('script', {src: 'components/google-code-prettify.js' }, sync);
addTag('script', {src: 'components/' + (debug ? 'lunr.js' : 'lunr.min.js') }, sync);
}
addTag('script', {src: 'components/marked.js' }, sync);