Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,6 @@ jobs:
run: npx grunt prepare

- name: Test
run: npm run test:browser
run: |
npm run test:browser-smoke
npm run test:browser
6 changes: 2 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,15 @@ module.exports = function (grunt) {
grunt.registerTask('globals', ['webpack']);
grunt.registerTask('release', 'Build final packages', [
'uglify',
'test:min',
'copy:dist',
'copy:components',
]);

grunt.registerTask('on-file-change', ['build', 'concat:tests', 'test']);
grunt.registerTask('on-file-change', ['build', 'concat:tests']);

// === Primary tasks ===
grunt.registerTask('dev', ['clean', 'connect', 'watch']);
grunt.registerTask('default', ['clean', 'build', 'test', 'release']);
grunt.registerTask('test', ['test:bin', 'test:cov']);
grunt.registerTask('default', ['clean', 'build', 'release']);
grunt.registerTask('bench', ['metrics']);
grunt.registerTask('prepare', ['build', 'concat:tests']);
grunt.registerTask(
Expand Down
6 changes: 3 additions & 3 deletions lib/handlebars/compiler/code-gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { isArray } from '../utils';
let SourceNode;

try {
/* istanbul ignore next */
/* v8 ignore next */
if (typeof define !== 'function' || !define.amd) {
// We don't support this in AMD environments. For these environments, we assume that
// they are running on the browser and thus have no need for the source-map library.
Expand All @@ -15,15 +15,15 @@ try {
/* NOP */
}

/* istanbul ignore if: tested but not covered in istanbul due to dist build */
/* v8 ignore next -- tested but not covered due to dist build */
if (!SourceNode) {
SourceNode = function (line, column, srcFile, chunks) {
this.src = '';
if (chunks) {
this.add(chunks);
}
};
/* istanbul ignore next */
/* v8 ignore next */
SourceNode.prototype = {
add: function (chunks) {
if (isArray(chunks)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/handlebars/compiler/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Compiler.prototype = {
},

accept: function (node) {
/* istanbul ignore next: Sanity code */
/* v8 ignore next -- Sanity code */
if (!this[node.type]) {
throw new Exception('Unknown type: ' + node.type, node);
}
Expand Down
10 changes: 5 additions & 5 deletions lib/handlebars/compiler/javascript-compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ JavaScriptCompiler.prototype = {
this.source.currentLocation = firstLoc;
this.pushSource('');

/* istanbul ignore next */
/* v8 ignore next */
if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {
throw new Exception('Compile completed with content left on stack');
}
Expand Down Expand Up @@ -924,7 +924,7 @@ JavaScriptCompiler.prototype = {
createdStack,
usedLiteral;

/* istanbul ignore next */
/* v8 ignore next */
if (!this.isInline()) {
throw new Exception('replaceStack on non-inline');
}
Expand Down Expand Up @@ -972,7 +972,7 @@ JavaScriptCompiler.prototype = {
this.inlineStack = [];
for (let i = 0, len = inlineStack.length; i < len; i++) {
let entry = inlineStack[i];
/* istanbul ignore if */
/* v8 ignore next */
if (entry instanceof Literal) {
this.compileStack.push(entry);
} else {
Expand All @@ -994,7 +994,7 @@ JavaScriptCompiler.prototype = {
return item.value;
} else {
if (!inline) {
/* istanbul ignore next */
/* v8 ignore next */
if (!this.stackSlot) {
throw new Exception('Invalid stack pop');
}
Expand All @@ -1008,7 +1008,7 @@ JavaScriptCompiler.prototype = {
let stack = this.isInline() ? this.inlineStack : this.compileStack,
item = stack[stack.length - 1];

/* istanbul ignore if */
/* v8 ignore next */
if (item instanceof Literal) {
return item.value;
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/handlebars/no-conflict.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default function (Handlebars) {
let $Handlebars = globalThis.Handlebars;

/* istanbul ignore next */
/* v8 ignore next */
Handlebars.noConflict = function () {
if (globalThis.Handlebars === Handlebars) {
globalThis.Handlebars = $Handlebars;
Expand Down
2 changes: 1 addition & 1 deletion lib/handlebars/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function checkRevision(compilerInfo) {
}

export function template(templateSpec, env) {
/* istanbul ignore next */
/* v8 ignore next */
if (!env) {
throw new Exception('No environment passed to template');
}
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function extension(module, filename) {
var templateString = fs.readFileSync(filename, 'utf8');
module.exports = handlebars.compile(templateString);
}
/* istanbul ignore else */
/* v8 ignore next 4 */
if (typeof require !== 'undefined' && require.extensions) {
require.extensions['.handlebars'] = extension;
require.extensions['.hbs'] = extension;
Expand Down
4 changes: 2 additions & 2 deletions lib/precompiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function loadFiles(opts, callback) {
opts.hasDirectory = true;

fs.readdir(path, function (err, children) {
/* istanbul ignore next : Race condition that being too lazy to test */
/* v8 ignore next -- Race condition that being too lazy to test */
if (err) {
return callback(err);
}
Expand All @@ -114,7 +114,7 @@ function loadFiles(opts, callback) {
});
} else {
fs.readFile(path, 'utf8', function (err, data) {
/* istanbul ignore next : Race condition that being too lazy to test */
/* v8 ignore next -- Race condition that being too lazy to test */
if (err) {
return callback(err);
}
Expand Down
9 changes: 0 additions & 9 deletions nyc.config.js

This file was deleted.

Loading