mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Decaf cleanup: remove Array.from()
This commit is contained in:
parent
e8f935d046
commit
ff2d31c066
1 changed files with 12 additions and 25 deletions
|
@ -7,7 +7,6 @@
|
||||||
// Fix any style issues and re-enable lint.
|
// Fix any style issues and re-enable lint.
|
||||||
/*
|
/*
|
||||||
* decaffeinate suggestions:
|
* decaffeinate suggestions:
|
||||||
* DS101: Remove unnecessary use of Array.from
|
|
||||||
* DS102: Remove unnecessary code created because of implicit returns
|
* DS102: Remove unnecessary code created because of implicit returns
|
||||||
* DS207: Consider shorter variations of null checks
|
* DS207: Consider shorter variations of null checks
|
||||||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||||
|
@ -61,10 +60,8 @@ describe('Setting a document', function () {
|
||||||
|
|
||||||
describe('when the updated doc exists in the doc updater', function () {
|
describe('when the updated doc exists in the doc updater', function () {
|
||||||
before(function (done) {
|
before(function (done) {
|
||||||
;[this.project_id, this.doc_id] = Array.from([
|
this.project_id = DocUpdaterClient.randomId()
|
||||||
DocUpdaterClient.randomId(),
|
this.doc_id = DocUpdaterClient.randomId()
|
||||||
DocUpdaterClient.randomId()
|
|
||||||
])
|
|
||||||
MockWebApi.insertDoc(this.project_id, this.doc_id, {
|
MockWebApi.insertDoc(this.project_id, this.doc_id, {
|
||||||
lines: this.lines,
|
lines: this.lines,
|
||||||
version: this.version
|
version: this.version
|
||||||
|
@ -155,10 +152,8 @@ describe('Setting a document', function () {
|
||||||
|
|
||||||
describe('when the updated doc does not exist in the doc updater', function () {
|
describe('when the updated doc does not exist in the doc updater', function () {
|
||||||
before(function (done) {
|
before(function (done) {
|
||||||
;[this.project_id, this.doc_id] = Array.from([
|
this.project_id = DocUpdaterClient.randomId()
|
||||||
DocUpdaterClient.randomId(),
|
this.doc_id = DocUpdaterClient.randomId()
|
||||||
DocUpdaterClient.randomId()
|
|
||||||
])
|
|
||||||
MockWebApi.insertDoc(this.project_id, this.doc_id, {
|
MockWebApi.insertDoc(this.project_id, this.doc_id, {
|
||||||
lines: this.lines,
|
lines: this.lines,
|
||||||
version: this.version
|
version: this.version
|
||||||
|
@ -220,10 +215,8 @@ describe('Setting a document', function () {
|
||||||
|
|
||||||
describe('when the updated doc is too large for the body parser', function () {
|
describe('when the updated doc is too large for the body parser', function () {
|
||||||
before(function (done) {
|
before(function (done) {
|
||||||
;[this.project_id, this.doc_id] = Array.from([
|
this.project_id = DocUpdaterClient.randomId()
|
||||||
DocUpdaterClient.randomId(),
|
this.doc_id = DocUpdaterClient.randomId()
|
||||||
DocUpdaterClient.randomId()
|
|
||||||
])
|
|
||||||
MockWebApi.insertDoc(this.project_id, this.doc_id, {
|
MockWebApi.insertDoc(this.project_id, this.doc_id, {
|
||||||
lines: this.lines,
|
lines: this.lines,
|
||||||
version: this.version
|
version: this.version
|
||||||
|
@ -274,10 +267,8 @@ describe('Setting a document', function () {
|
||||||
|
|
||||||
describe('when the updated doc is large but under the bodyParser and HTTPController size limit', function () {
|
describe('when the updated doc is large but under the bodyParser and HTTPController size limit', function () {
|
||||||
before(function (done) {
|
before(function (done) {
|
||||||
;[this.project_id, this.doc_id] = Array.from([
|
this.project_id = DocUpdaterClient.randomId()
|
||||||
DocUpdaterClient.randomId(),
|
this.doc_id = DocUpdaterClient.randomId()
|
||||||
DocUpdaterClient.randomId()
|
|
||||||
])
|
|
||||||
MockWebApi.insertDoc(this.project_id, this.doc_id, {
|
MockWebApi.insertDoc(this.project_id, this.doc_id, {
|
||||||
lines: this.lines,
|
lines: this.lines,
|
||||||
version: this.version
|
version: this.version
|
||||||
|
@ -343,10 +334,8 @@ describe('Setting a document', function () {
|
||||||
|
|
||||||
describe('with the undo flag', function () {
|
describe('with the undo flag', function () {
|
||||||
before(function (done) {
|
before(function (done) {
|
||||||
;[this.project_id, this.doc_id] = Array.from([
|
this.project_id = DocUpdaterClient.randomId()
|
||||||
DocUpdaterClient.randomId(),
|
this.doc_id = DocUpdaterClient.randomId()
|
||||||
DocUpdaterClient.randomId()
|
|
||||||
])
|
|
||||||
MockWebApi.insertDoc(this.project_id, this.doc_id, {
|
MockWebApi.insertDoc(this.project_id, this.doc_id, {
|
||||||
lines: this.lines,
|
lines: this.lines,
|
||||||
version: this.version
|
version: this.version
|
||||||
|
@ -407,10 +396,8 @@ describe('Setting a document', function () {
|
||||||
|
|
||||||
return describe('without the undo flag', function () {
|
return describe('without the undo flag', function () {
|
||||||
before(function (done) {
|
before(function (done) {
|
||||||
;[this.project_id, this.doc_id] = Array.from([
|
this.project_id = DocUpdaterClient.randomId()
|
||||||
DocUpdaterClient.randomId(),
|
this.doc_id = DocUpdaterClient.randomId()
|
||||||
DocUpdaterClient.randomId()
|
|
||||||
])
|
|
||||||
MockWebApi.insertDoc(this.project_id, this.doc_id, {
|
MockWebApi.insertDoc(this.project_id, this.doc_id, {
|
||||||
lines: this.lines,
|
lines: this.lines,
|
||||||
version: this.version
|
version: this.version
|
||||||
|
|
Loading…
Reference in a new issue