mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 20:31:15 +08:00
DEV: migrate tests to async/await
This commit is contained in:
15
test/javascripts/helpers/d-editor-helper.js
Normal file
15
test/javascripts/helpers/d-editor-helper.js
Normal file
@ -0,0 +1,15 @@
|
||||
Ember.Test.registerAsyncHelper("formatTextWithSelection", function(
|
||||
app,
|
||||
text,
|
||||
[start, len]
|
||||
) {
|
||||
return [
|
||||
'"',
|
||||
text.substr(0, start),
|
||||
"<",
|
||||
text.substr(start, len),
|
||||
">",
|
||||
text.substr(start + len),
|
||||
'"'
|
||||
].join("");
|
||||
});
|
Reference in New Issue
Block a user