mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
DEV: migrate tests to async/await
This commit is contained in:
parent
176d8ca78d
commit
04baddf731
31 changed files with 1320 additions and 1729 deletions
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("");
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue