mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
driver cleanups
This commit is contained in:
@@ -54,12 +54,17 @@ Sky._def_template = function (name, raw_func) {
|
||||
var in_partial = !!Sky._pending_partials;
|
||||
if (!in_partial)
|
||||
Sky._pending_partials = {};
|
||||
// XXX should catch exceptions and clean up pending_partials if
|
||||
// stack is unwound
|
||||
var html = raw_func(data, {
|
||||
helpers: name ? Template[name] : {},
|
||||
partials: Sky._partials
|
||||
});
|
||||
|
||||
// try { XXX NOCOMMIT COMMENT???
|
||||
var html = raw_func(data, {
|
||||
helpers: name ? Template[name] : {},
|
||||
partials: Sky._partials
|
||||
});
|
||||
/* } catch (e) {
|
||||
if (!in_partial)
|
||||
Sky._pending_partials = null;
|
||||
throw e;
|
||||
} */
|
||||
|
||||
// XXX see the 'clean' function in jquery for a much more
|
||||
// elaborate implementation of this. it's smart about
|
||||
|
||||
@@ -3,13 +3,11 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
placeholder
|
||||
{{> results }}
|
||||
placeholder
|
||||
</body>
|
||||
|
||||
<template name="results">
|
||||
placeholder
|
||||
{{> rerun_all_button }}
|
||||
{{#each results}}
|
||||
{{#if type_is "begin"}}
|
||||
<div class="begin">{{name}}</div>
|
||||
@@ -25,27 +23,20 @@
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{> rerun_all_button }}
|
||||
placeholder
|
||||
</template>
|
||||
|
||||
<template name="rerun_all_button">
|
||||
placeholder
|
||||
<div><div class="rerunall">Rerun all</div></div>
|
||||
placeholder
|
||||
</template>
|
||||
|
||||
<template name="exception">
|
||||
placeholder
|
||||
<div class="exception">Exception: {{message}}
|
||||
{{stack}}
|
||||
<div class="rerun">Rerun and stop here</div>
|
||||
</div>
|
||||
placeholder
|
||||
</template>
|
||||
|
||||
<template name="fail">
|
||||
placeholder
|
||||
{{#if type_is "assert"}}
|
||||
<div class="assert">
|
||||
{{message}}
|
||||
@@ -59,7 +50,6 @@
|
||||
<span>
|
||||
<div class="rerun">Rerun and stop here</a>
|
||||
</span>
|
||||
placeholder
|
||||
</template>
|
||||
|
||||
<template name="test_renderList_each">
|
||||
|
||||
@@ -20,6 +20,10 @@ Template.exception.events = {
|
||||
}
|
||||
};
|
||||
|
||||
Template.fail.type_is = function (arg) {
|
||||
return this.type === arg;
|
||||
};
|
||||
|
||||
Template.fail.events = {
|
||||
"click .rerun": function () {
|
||||
run_tests(this.cookie);
|
||||
|
||||
Reference in New Issue
Block a user