mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 09:57:25 +08:00
Rename all test files from JS -> ES6
This commit is contained in:
27
test/javascripts/components/load-more-test.js
Normal file
27
test/javascripts/components/load-more-test.js
Normal file
@ -0,0 +1,27 @@
|
||||
import { configureEyeline } from "discourse/lib/eyeline";
|
||||
import componentTest from "helpers/component-test";
|
||||
|
||||
moduleForComponent("load-more", { integration: true });
|
||||
|
||||
componentTest("updates once after initialization", {
|
||||
template: `
|
||||
{{#load-more selector=".numbers tr" action=loadMore}}
|
||||
<table class="numbers"><tr></tr></table>
|
||||
{{/load-more}}`,
|
||||
|
||||
beforeEach() {
|
||||
this.set("loadMore", () => this.set("loadedMore", true));
|
||||
configureEyeline({
|
||||
skipUpdate: false,
|
||||
rootElement: Discourse.rootElement
|
||||
});
|
||||
},
|
||||
|
||||
afterEach() {
|
||||
configureEyeline();
|
||||
},
|
||||
|
||||
test(assert) {
|
||||
assert.ok(this.loadedMore);
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user