Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Nov 13, 2024
1 parent 88504e2 commit aa426ca
Showing 1 changed file with 3 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,34 +1,7 @@
import { defineComponent, jitSuite, RenderTest, test, tracked } from '../..';

class LogTest extends RenderTest {
static suiteName = '{{log}} keyword';

originalLog?: () => void;
logCalls: unknown[] = [];

beforeEach() {
/* eslint-disable no-console */
this.originalLog = console.log;
console.log = (...args: unknown[]) => {
this.logCalls.push(...args);
/* eslint-enable no-console */
};
}

afterEach() {
/* eslint-disable no-console */
console.log = this.originalLog!;
/* eslint-enable no-console */
}

assertLog(values: unknown[]) {
this.assertHTML('');
this.assert.strictEqual(this.logCalls.length, values.length);

for (let i = 0, len = values.length; i < len; i++) {
this.assert.strictEqual(this.logCalls[i], values[i]);
}
}
class InlineIfTest extends RenderTest {
static suiteName = 'inline {{if}} keyword';

@test
'inline if can swap render components'() {
Expand Down Expand Up @@ -57,4 +30,4 @@ class LogTest extends RenderTest {
}
}

jitSuite(LogTest);
jitSuite(InlineIfTest);

0 comments on commit aa426ca

Please sign in to comment.