moved decaffeinated files to js folder

This commit is contained in:
mserranom
2020-02-25 17:15:31 +01:00
parent 957f80ada4
commit bf470cf5ae
4 changed files with 155 additions and 143 deletions

View File

@@ -10,25 +10,30 @@
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const chai = require("chai");
if (Object.prototype.should == null) { chai.should(); }
const { expect } = chai;
const request = require("request");
const Settings = require("settings-sharelatex");
const chai = require('chai')
if (Object.prototype.should == null) {
chai.should()
}
const { expect } = chai
const request = require('request')
const Settings = require('settings-sharelatex')
const buildUrl = path => `http://${Settings.internal.clsi.host}:${Settings.internal.clsi.port}/${path}`;
const buildUrl = path =>
`http://${Settings.internal.clsi.host}:${Settings.internal.clsi.port}/${path}`
const url = buildUrl(`project/smoketest-${process.pid}/compile`);
const url = buildUrl(`project/smoketest-${process.pid}/compile`)
describe("Running a compile", function() {
before(function(done) {
return request.post({
url,
json: {
compile: {
resources: [{
path: "main.tex",
content: `\
describe('Running a compile', function() {
before(function(done) {
return request.post(
{
url,
json: {
compile: {
resources: [
{
path: 'main.tex',
content: `\
% Membrane-like surface
% Author: Yotam Avital
\\documentclass{article}
@@ -61,29 +66,35 @@ describe("Running a compile", function() {
\\end{tikzpicture}
\\end{document}\
`
}
]
}
}
}, (error, response, body) => {
this.error = error;
this.response = response;
this.body = body;
return done();
});
});
}
]
}
}
},
(error, response, body) => {
this.error = error
this.response = response
this.body = body
return done()
}
)
})
it("should return the pdf", function() {
for (const file of Array.from(this.body.compile.outputFiles)) {
if (file.type === "pdf") { return; }
}
throw new Error("no pdf returned");
});
return it("should return the log", function() {
for (const file of Array.from(this.body.compile.outputFiles)) {
if (file.type === "log") { return; }
}
throw new Error("no log returned");
});
});
it('should return the pdf', function() {
for (const file of Array.from(this.body.compile.outputFiles)) {
if (file.type === 'pdf') {
return
}
}
throw new Error('no pdf returned')
})
return it('should return the log', function() {
for (const file of Array.from(this.body.compile.outputFiles)) {
if (file.type === 'log') {
return
}
}
throw new Error('no log returned')
})
})