fixing CI

This commit is contained in:
Martin McKeaveney 2020-05-18 11:18:31 +01:00
parent c8dd48b507
commit e244e099a6
8 changed files with 14 additions and 26 deletions

View File

@ -21,6 +21,7 @@
}
],
"rules": {
"prettier/prettier": "error"
"prettier/prettier": "error",
"no-self-assign": "off"
}
}

View File

@ -251,12 +251,12 @@ const renameScreen = store => (oldname, newname) => {
const savePage = store => async page => {
store.update(state => {
if (s.currentFrontEndType !== "page" || !s.currentPageName) {
if (state.currentFrontEndType !== "page" || !state.currentPageName) {
return state
}
s.pages[s.currentPageName] = page
_savePage(s)
state.pages[state.currentPageName] = page
_savePage(state)
return state
})
}
@ -271,7 +271,9 @@ const addStylesheet = store => stylesheet => {
const removeStylesheet = store => stylesheet => {
store.update(state => {
state.pages.stylesheets = s.pages.stylesheets.filter(s => s !== stylesheet)
state.pages.stylesheets = state.pages.stylesheets.filter(
s => s !== stylesheet
)
_savePage(state)
return state
})
@ -446,7 +448,7 @@ const setComponentCode = store => code => {
// save without messing with the store
_saveScreenApi(state.currentPreviewItem, state)
return s
return state
})
}

View File

@ -32,8 +32,8 @@ export default ({
text-transform: uppercase;
font-weight: bold;
}
<\/style>
<\script>
</style>
<script>
window["##BUDIBASE_FRONTEND_DEFINITION##"] = ${frontendDefinition};
window["##BUDIBASE_FRONTEND_FUNCTIONS##"] = ${currentPageFunctions};
@ -41,7 +41,7 @@ export default ({
.then(module => {
module.loadBudibase({ window, localStorage });
})
<\/script>
</script>
</head>
<body>
</body>

View File

@ -29,15 +29,6 @@ describe("createDefaultProps", () => {
expect(props._component).toBe("some_component")
})
it("should return error when component name not supplied", () => {
const comp = getcomponent()
comp.name = ""
const { errors } = createProps(comp)
expect(errors.length).toEqual(1)
})
it("should create a object with single blank string value, when prop definition is 'string' ", () => {
const comp = getcomponent()
comp.props.fieldName = "string"

View File

@ -11,9 +11,6 @@
"publishConfig": {
"access": "public"
},
"scripts": {
"test": "test"
},
"keywords": [
"budibase"
],

View File

@ -2,9 +2,6 @@
"name": "name",
"version": "1.0.0",
"description": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {

View File

@ -39,7 +39,7 @@ exports.create = async function(ctx) {
ctx.body = newModel
}
exports.update = async function(ctx) {}
exports.update = async function() {}
exports.destroy = async function(ctx) {
const db = new CouchDB(ctx.params.instanceId)

View File

@ -1,7 +1,7 @@
const CouchDB = require("../../db")
const controller = {
query: async ctx => {},
query: async () => {},
fetch: async ctx => {
const db = new CouchDB(ctx.params.instanceId)
const designDoc = await db.get("_design/database")