mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-08-15 10:49:44 +02:00
Use ES5 style trailing commas, to avoid unnecessary lines during code diffs
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
|
||||
observer.observe(document.getElementById("preview"), {
|
||||
childList: true,
|
||||
subtree: true
|
||||
subtree: true,
|
||||
})
|
||||
|
||||
function Autoscroll(target) {
|
||||
|
@ -25,7 +25,7 @@
|
||||
})
|
||||
|
||||
observer.observe(editorModifierTagsList, {
|
||||
childList: true
|
||||
childList: true,
|
||||
})
|
||||
|
||||
let current
|
||||
|
@ -18,7 +18,7 @@
|
||||
})
|
||||
|
||||
observer.observe(editorModifierTagsList, {
|
||||
childList: true
|
||||
childList: true,
|
||||
})
|
||||
|
||||
function ModifierMouseWheel(target) {
|
||||
|
@ -13,19 +13,19 @@
|
||||
customModifiers = customModifiers.filter((m) => m.trim() !== "")
|
||||
customModifiers = customModifiers.map(function(m) {
|
||||
return {
|
||||
modifier: m
|
||||
modifier: m,
|
||||
}
|
||||
})
|
||||
|
||||
let customGroup = {
|
||||
category: "Custom Modifiers",
|
||||
modifiers: customModifiers
|
||||
modifiers: customModifiers,
|
||||
}
|
||||
|
||||
customModifiersGroupElement = createModifierGroup(customGroup, true)
|
||||
|
||||
createCollapsibles(customModifiersGroupElement)
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
})()
|
||||
|
@ -45,7 +45,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
const queryString = new jasmine.QueryString({
|
||||
getWindowLocation: function() {
|
||||
return window.location
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
const filterSpecs = !!queryString.getParam("spec")
|
||||
@ -53,7 +53,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
const config = {
|
||||
stopOnSpecFailure: queryString.getParam("stopOnSpecFailure"),
|
||||
stopSpecOnExpectationFailure: queryString.getParam("stopSpecOnExpectationFailure"),
|
||||
hideDisabled: queryString.getParam("hideDisabled")
|
||||
hideDisabled: queryString.getParam("hideDisabled"),
|
||||
}
|
||||
|
||||
const random = queryString.getParam("random")
|
||||
@ -89,7 +89,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
return document.createTextNode.apply(document, arguments)
|
||||
},
|
||||
timer: new jasmine.Timer(),
|
||||
filterSpecs: filterSpecs
|
||||
filterSpecs: filterSpecs,
|
||||
})
|
||||
|
||||
/**
|
||||
@ -104,7 +104,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
const specFilter = new jasmine.HtmlSpecFilter({
|
||||
filterString: function() {
|
||||
return queryString.getParam("spec")
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
config.specFilter = function(spec) {
|
||||
|
@ -106,7 +106,7 @@ jasmineRequire.HtmlReporter = function(j$) {
|
||||
createDom("a", {
|
||||
className: "jasmine-title",
|
||||
href: "http://jasmine.github.io/",
|
||||
target: "_blank"
|
||||
target: "_blank",
|
||||
}),
|
||||
createDom("span", { className: "jasmine-version" }, j$.version)
|
||||
),
|
||||
@ -163,7 +163,7 @@ jasmineRequire.HtmlReporter = function(j$) {
|
||||
createDom("li", {
|
||||
className: this.displaySpecInCorrectFormat(result),
|
||||
id: "spec_" + result.id,
|
||||
title: result.fullName
|
||||
title: result.fullName,
|
||||
})
|
||||
)
|
||||
|
||||
@ -246,7 +246,7 @@ jasmineRequire.HtmlReporter = function(j$) {
|
||||
"a",
|
||||
{
|
||||
title: "randomized with seed " + order.seed,
|
||||
href: seedHref(order.seed)
|
||||
href: seedHref(order.seed),
|
||||
},
|
||||
order.seed
|
||||
)
|
||||
@ -428,7 +428,7 @@ jasmineRequire.HtmlReporter = function(j$) {
|
||||
createDom(
|
||||
"li",
|
||||
{
|
||||
className: "jasmine-suite-detail jasmine-" + resultNode.result.status
|
||||
className: "jasmine-suite-detail jasmine-" + resultNode.result.status,
|
||||
},
|
||||
createDom("a", { href: specHref(resultNode.result) }, resultNode.result.description)
|
||||
)
|
||||
@ -454,7 +454,7 @@ jasmineRequire.HtmlReporter = function(j$) {
|
||||
"li",
|
||||
{
|
||||
className: "jasmine-" + resultNode.result.status,
|
||||
id: "spec-" + resultNode.result.id
|
||||
id: "spec-" + resultNode.result.id,
|
||||
},
|
||||
createDom("a", { href: specHref(resultNode.result) }, specDescription)
|
||||
)
|
||||
@ -477,7 +477,7 @@ jasmineRequire.HtmlReporter = function(j$) {
|
||||
createDom("input", {
|
||||
className: "jasmine-fail-fast",
|
||||
id: "jasmine-fail-fast",
|
||||
type: "checkbox"
|
||||
type: "checkbox",
|
||||
}),
|
||||
createDom(
|
||||
"label",
|
||||
@ -491,7 +491,7 @@ jasmineRequire.HtmlReporter = function(j$) {
|
||||
createDom("input", {
|
||||
className: "jasmine-throw",
|
||||
id: "jasmine-throw-failures",
|
||||
type: "checkbox"
|
||||
type: "checkbox",
|
||||
}),
|
||||
createDom(
|
||||
"label",
|
||||
@ -505,7 +505,7 @@ jasmineRequire.HtmlReporter = function(j$) {
|
||||
createDom("input", {
|
||||
className: "jasmine-random",
|
||||
id: "jasmine-random-order",
|
||||
type: "checkbox"
|
||||
type: "checkbox",
|
||||
}),
|
||||
createDom(
|
||||
"label",
|
||||
@ -519,7 +519,7 @@ jasmineRequire.HtmlReporter = function(j$) {
|
||||
createDom("input", {
|
||||
className: "jasmine-disabled",
|
||||
id: "jasmine-hide-disabled",
|
||||
type: "checkbox"
|
||||
type: "checkbox",
|
||||
}),
|
||||
createDom(
|
||||
"label",
|
||||
@ -608,7 +608,7 @@ jasmineRequire.HtmlReporter = function(j$) {
|
||||
message: warning,
|
||||
stack: result.deprecationWarnings[i].stack,
|
||||
runnableName: result.fullName,
|
||||
runnableType: runnableType
|
||||
runnableType: runnableType,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -9,11 +9,11 @@ beforeEach(function() {
|
||||
return {
|
||||
compare: function(actual, expected) {
|
||||
return {
|
||||
pass: expected.includes(actual)
|
||||
pass: expected.includes(actual),
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
describe("stable-diffusion-ui", function() {
|
||||
@ -116,7 +116,7 @@ describe("stable-diffusion-ui", function() {
|
||||
value["foo"] = "bar"
|
||||
}
|
||||
return { value, done }
|
||||
}
|
||||
},
|
||||
})
|
||||
const gen2 = SD.Task.asGenerator({
|
||||
generator: gen1,
|
||||
@ -128,7 +128,7 @@ describe("stable-diffusion-ui", function() {
|
||||
value.test = 2 * value.test
|
||||
}
|
||||
return { value, done }
|
||||
}
|
||||
},
|
||||
})
|
||||
expect(await SD.Task.enqueue(gen2)).toEqual({ test: 32, foo: "bar" })
|
||||
})
|
||||
@ -153,7 +153,7 @@ describe("stable-diffusion-ui", function() {
|
||||
expect(typeof missing).toBe("undefined")
|
||||
return { foo: "bar" }
|
||||
},
|
||||
dependencies: ["ctx", "missing", "one", "foo"]
|
||||
dependencies: ["ctx", "missing", "one", "foo"],
|
||||
}
|
||||
)
|
||||
const fooObj = cont.get("foo")
|
||||
@ -180,7 +180,7 @@ describe("stable-diffusion-ui", function() {
|
||||
let res = await fetch("/render", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
prompt: "a photograph of an astronaut riding a horse",
|
||||
@ -199,8 +199,8 @@ describe("stable-diffusion-ui", function() {
|
||||
show_only_filtered_image: true,
|
||||
output_format: "jpeg",
|
||||
|
||||
session_id: JASMINE_SESSION_ID
|
||||
})
|
||||
session_id: JASMINE_SESSION_ID,
|
||||
}),
|
||||
})
|
||||
expect(res.ok).toBeTruthy()
|
||||
const renderRequest = await res.json()
|
||||
@ -283,7 +283,7 @@ describe("stable-diffusion-ui", function() {
|
||||
show_only_filtered_image: false,
|
||||
//"use_face_correction": 'GFPGANv1.3',
|
||||
use_upscale: "RealESRGAN_x4plus",
|
||||
session_id: JASMINE_SESSION_ID
|
||||
session_id: JASMINE_SESSION_ID,
|
||||
},
|
||||
function(event) {
|
||||
console.log(this, event)
|
||||
@ -314,7 +314,7 @@ describe("stable-diffusion-ui", function() {
|
||||
height: 128,
|
||||
seed: SD.MAX_SEED_VALUE,
|
||||
num_inference_steps: 10,
|
||||
session_id: JASMINE_SESSION_ID
|
||||
session_id: JASMINE_SESSION_ID,
|
||||
})
|
||||
expect(renderTask.status).toBe(SD.TaskStatus.init)
|
||||
|
||||
@ -326,7 +326,7 @@ describe("stable-diffusion-ui", function() {
|
||||
|
||||
await renderTask.waitUntil({
|
||||
state: SD.TaskStatus.processing,
|
||||
callback: () => console.log("Waiting for render task to start...")
|
||||
callback: () => console.log("Waiting for render task to start..."),
|
||||
})
|
||||
expect(renderTask.status).toBe(SD.TaskStatus.processing)
|
||||
|
||||
@ -362,7 +362,7 @@ describe("stable-diffusion-ui", function() {
|
||||
show_only_filtered_image: false,
|
||||
//"use_face_correction": 'GFPGANv1.3',
|
||||
use_upscale: "RealESRGAN_x4plus",
|
||||
session_id: JASMINE_SESSION_ID
|
||||
session_id: JASMINE_SESSION_ID,
|
||||
})
|
||||
await renderTask.enqueue(function(event) {
|
||||
console.log(this, event)
|
||||
|
@ -424,7 +424,7 @@
|
||||
let res = await fetch("/model/merge", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(request)
|
||||
body: JSON.stringify(request),
|
||||
})
|
||||
const data = await res.json()
|
||||
addLogMessage(JSON.stringify(data))
|
||||
@ -445,6 +445,6 @@
|
||||
hypernetworkModelField.innerHTML = ""
|
||||
await getModels()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
})()
|
||||
|
@ -21,7 +21,7 @@
|
||||
})
|
||||
|
||||
observer.observe(editorModifierTagsList, {
|
||||
childList: true
|
||||
childList: true,
|
||||
})
|
||||
|
||||
function ModifierToggle() {
|
||||
|
@ -48,6 +48,6 @@
|
||||
|
||||
return marked.parse(releaseNotes)
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
})()
|
||||
|
@ -16,7 +16,7 @@
|
||||
stopSpecOnExpectationFailure: "true",
|
||||
stopOnSpecFailure: "false",
|
||||
random: "false",
|
||||
hideDisabled: "false"
|
||||
hideDisabled: "false",
|
||||
}
|
||||
const optStr = Object.entries(options)
|
||||
.map(([key, val]) => `${key}=${val}`)
|
||||
|
Reference in New Issue
Block a user