Skip to content

mock values for web #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
mock values for web
  • Loading branch information
ShMcK committed Mar 22, 2020
commit 10c72f64d29e3c4e522da5710d4edd90d32518a1
4 changes: 4 additions & 0 deletions web-app/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import * as React from 'react'
import ReactDOM from 'react-dom'

// mock values for non-extension web use
import './mock'

import App from './App'

// init error logging
Expand Down
9 changes: 9 additions & 0 deletions web-app/src/mock/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// @ts-ignore
if (!global.acquireVsCodeApi) {
// @ts-ignore
global.acquireVsCodeApi = () => ({
postMessage(event: string) {
console.log('postMessage', event)
},
})
}