Add devEnableShare config option (#1141)

* add devEnableShare config option

* Toggle in config.js
This commit is contained in:
Yash Jipkate
2021-05-31 01:06:10 +05:30
committed by GitHub
parent 327c259a3d
commit 7b05c49215
4 changed files with 14 additions and 0 deletions
+10
View File
@@ -199,6 +199,16 @@ var _ = Describe("serveIndex", func() {
config := extractAppConfig(w.Body.String())
Expect(config).To(HaveKeyWithValue("enableUserEditing", true))
})
It("sets the devEnableShare", func() {
r := httptest.NewRequest("GET", "/index.html", nil)
w := httptest.NewRecorder()
serveIndex(ds, fs)(w, r)
config := extractAppConfig(w.Body.String())
Expect(config).To(HaveKeyWithValue("devEnableShare", false))
})
})
var appConfigRegex = regexp.MustCompile(`(?m)window.__APP_CONFIG__="([^"]*)`)