Skip to content

Commit

Permalink
improvement(create-plugin): some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
germanferrero committed Apr 21, 2021
1 parent e459484 commit 417dad9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion devTools/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ const apiContent = () =>
`// Here you define the api calls to the ubus uhttpd enpoints your plugin needs
import api from 'utils/uhttpd.service';
export const getSomething = () => api.call('package', 'command', {})
export const getSomething = () => api.call('package', 'command', {}).toPromise();
`

const apiSpecContent = (name) =>
`// Here you define unit tests for the api endpoints of this plugin
import { getSomething } from './${name}Api'
import api from 'utils/uhttpd.service';
import { of } from 'rxjs';
jest.mock('utils/uhttpd.service')
beforeEach(() => {
Expand Down

0 comments on commit 417dad9

Please sign in to comment.