mockaton 6.4.0 → 6.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/sample-mocks/api/user/{videos(entirely unverified).GET.200.json → videos(default).GET.200.json} +1 -1
- package/src/MockBroker.js +7 -1
- /package/sample-mocks/api/user/{videos(assorted).GET.200.json → videos(all variants).GET.200.json} +0 -0
- /package/sample-mocks/api/user/{videos(entirely verified)(another comment).GET.200.json → videos(verified)(another comment).GET.200.json} +0 -0
package/package.json
CHANGED
package/src/MockBroker.js
CHANGED
|
@@ -41,7 +41,13 @@ export class MockBroker {
|
|
|
41
41
|
get status() { return parseFilename(this.file).status }
|
|
42
42
|
|
|
43
43
|
selectDefaultFile() {
|
|
44
|
-
this
|
|
44
|
+
const userSpecifiedDefault = this.#findMockWithDefaultComment()
|
|
45
|
+
if (userSpecifiedDefault)
|
|
46
|
+
this.mocks = [ // sort for dashboard list TESTME
|
|
47
|
+
userSpecifiedDefault,
|
|
48
|
+
...this.mocks.filter(m => m !== userSpecifiedDefault)
|
|
49
|
+
]
|
|
50
|
+
this.updateFile(userSpecifiedDefault || this.mocks[0])
|
|
45
51
|
}
|
|
46
52
|
#findMockWithDefaultComment() {
|
|
47
53
|
for (const f of this.mocks)
|
/package/sample-mocks/api/user/{videos(assorted).GET.200.json → videos(all variants).GET.200.json}
RENAMED
|
File without changes
|