Просмотр исходного кода

decaffeinate: Run post-processing cleanups on ArchiveDocsTests.coffee and 6 other files

decaffeinate 6 лет назад
Родитель
Сommit
1391ae96e7

+ 8 - 1
services/docstore/test/acceptance/coffee/ArchiveDocsTests.js

@@ -1,3 +1,10 @@
+/* eslint-disable
+    camelcase,
+    handle-callback-err,
+    no-unused-vars,
+*/
+// TODO: This file was created by bulk-decaffeinate.
+// Fix any style issues and re-enable lint.
 /*
  * decaffeinate suggestions:
  * DS101: Remove unnecessary use of Array.from
@@ -19,7 +26,7 @@ const DocstoreClient = require("./helpers/DocstoreClient");
 
 describe("Archiving", function() {
 
-	before(done => DocstoreApp.ensureRunning(done));
+	before(function(done) { return DocstoreApp.ensureRunning(done); });
 
 	describe("multiple docs in a project", function() {
 		before(function(done) {

+ 14 - 7
services/docstore/test/acceptance/coffee/DeletingDocsTests.js

@@ -1,3 +1,10 @@
+/* eslint-disable
+    camelcase,
+    handle-callback-err,
+    no-unused-vars,
+*/
+// TODO: This file was created by bulk-decaffeinate.
+// Fix any style issues and re-enable lint.
 /*
  * decaffeinate suggestions:
  * DS102: Remove unnecessary code created because of implicit returns
@@ -52,13 +59,13 @@ describe("Deleting a doc", function() {
 		});
 	});
 
-	return describe("when the doc does not exist", () => it("should return a 404", function(done) {
+	return describe("when the doc does not exist", function() { return it("should return a 404", function(done) {
         const missing_doc_id = ObjectId();
-        return DocstoreClient.deleteDoc(this.project_id, missing_doc_id, function(error, res, doc) {
+        return DocstoreClient.deleteDoc(this.project_id, missing_doc_id, (error, res, doc) => {
             res.statusCode.should.equal(404);
             return done();
         });
-    }));
+    }); });
 });
 
 describe("Destroying a project's documents", function() {
@@ -71,7 +78,7 @@ describe("Destroying a project's documents", function() {
 		});
 
 		it("should remove the doc from the docs collection", function(done) {
-			return db.docs.find({_id: this.doc_id}, function(err, docs) {
+			return db.docs.find({_id: this.doc_id}, (err, docs) => {
 				expect(err).not.to.exist;
 				expect(docs).to.deep.equal([]);
 				return done();
@@ -79,7 +86,7 @@ describe("Destroying a project's documents", function() {
 		});
 
 		return it("should remove the docOps from the docOps collection", function(done) {
-			return db.docOps.find({doc_id: this.doc_id}, function(err, docOps) {
+			return db.docOps.find({doc_id: this.doc_id}, (err, docOps) => {
 				expect(err).not.to.exist;
 				expect(docOps).to.deep.equal([]);
 				return done();
@@ -96,7 +103,7 @@ describe("Destroying a project's documents", function() {
 		});
 
 		it("should remove the doc from the docs collection", function(done) {
-			return db.docs.find({_id: this.doc_id}, function(err, docs) {
+			return db.docs.find({_id: this.doc_id}, (err, docs) => {
 				expect(err).not.to.exist;
 				expect(docs).to.deep.equal([]);
 				return done();
@@ -104,7 +111,7 @@ describe("Destroying a project's documents", function() {
 		});
 
 		it("should remove the docOps from the docOps collection", function(done) {
-			return db.docOps.find({doc_id: this.doc_id}, function(err, docOps) {
+			return db.docOps.find({doc_id: this.doc_id}, (err, docOps) => {
 				expect(err).not.to.exist;
 				expect(docOps).to.deep.equal([]);
 				return done();

+ 6 - 0
services/docstore/test/acceptance/coffee/GettingAllDocsTests.js

@@ -1,3 +1,9 @@
+/* eslint-disable
+    handle-callback-err,
+    no-unused-vars,
+*/
+// TODO: This file was created by bulk-decaffeinate.
+// Fix any style issues and re-enable lint.
 /*
  * decaffeinate suggestions:
  * DS101: Remove unnecessary use of Array.from

+ 12 - 5
services/docstore/test/acceptance/coffee/GettingDocsTests.js

@@ -1,3 +1,10 @@
+/* eslint-disable
+    camelcase,
+    handle-callback-err,
+    no-unused-vars,
+*/
+// TODO: This file was created by bulk-decaffeinate.
+// Fix any style issues and re-enable lint.
 /*
  * decaffeinate suggestions:
  * DS102: Remove unnecessary code created because of implicit returns
@@ -36,22 +43,22 @@ describe("Getting a doc", function() {
 		});
 	});
 
-	describe("when the doc exists", () => it("should get the doc lines and version", function(done) {
+	describe("when the doc exists", function() { return it("should get the doc lines and version", function(done) {
         return DocstoreClient.getDoc(this.project_id, this.doc_id, {}, (error, res, doc) => {
             doc.lines.should.deep.equal(this.lines);
             doc.version.should.equal(this.version);
             doc.ranges.should.deep.equal(this.ranges);
             return done();
         });
-    }));
+    }); });
 
-	describe("when the doc does not exist", () => it("should return a 404", function(done) {
+	describe("when the doc does not exist", function() { return it("should return a 404", function(done) {
         const missing_doc_id = ObjectId();
-        return DocstoreClient.getDoc(this.project_id, missing_doc_id, {}, function(error, res, doc) {
+        return DocstoreClient.getDoc(this.project_id, missing_doc_id, {}, (error, res, doc) => {
             res.statusCode.should.equal(404);
             return done();
         });
-    }));
+    }); });
 
 	return describe("when the doc is a deleted doc", function() {
 		beforeEach(function(done) {

+ 6 - 0
services/docstore/test/acceptance/coffee/UpdatingDocsTests.js

@@ -1,3 +1,9 @@
+/* eslint-disable
+    handle-callback-err,
+    no-unused-vars,
+*/
+// TODO: This file was created by bulk-decaffeinate.
+// Fix any style issues and re-enable lint.
 /*
  * decaffeinate suggestions:
  * DS102: Remove unnecessary code created because of implicit returns

+ 5 - 0
services/docstore/test/acceptance/coffee/helpers/DocstoreApp.js

@@ -1,3 +1,8 @@
+/* eslint-disable
+    handle-callback-err,
+*/
+// TODO: This file was created by bulk-decaffeinate.
+// Fix any style issues and re-enable lint.
 /*
  * decaffeinate suggestions:
  * DS101: Remove unnecessary use of Array.from

+ 7 - 0
services/docstore/test/acceptance/coffee/helpers/DocstoreClient.js

@@ -1,3 +1,10 @@
+/* eslint-disable
+    camelcase,
+    handle-callback-err,
+    no-unused-vars,
+*/
+// TODO: This file was created by bulk-decaffeinate.
+// Fix any style issues and re-enable lint.
 /*
  * decaffeinate suggestions:
  * DS102: Remove unnecessary code created because of implicit returns