Make sure to install these packages:
- npm install -g @shopify/cli
- npm install -g @shopify/app
Make sure to install these packages:
const mock = jest.mock('@services/plaid', () => { | |
const PlaidService = jest.requireActual('@services/plaid'); | |
return class PlaidServiceMock extends PlaidService { | |
constructor() { | |
super(); | |
this.somefn = jest.fn(() => { | |
return { token: 'test' }; | |
}); | |
} | |
}; |
If you are not using CommonJS on NodeJS and having problems with the intellisense for getting into modules.
module-alias
and module-alias-jest
package.json
file with your aliases:{
"_moduleAliases": {
"$root": ".",
"$src": "./src",
# Error detected while processing .vim/bundle/vim-fugitive/plugin/fugitive.vim: | |
cd && cd /.vim/bundle/vim-fugitive/plugin/ | |
git pull --rebase |
import express 'express'; | |
const app = express(); | |
app.use(express.json()); | |
app.use(express.bodyParser()); | |
// Using Middlewares | |
// app.use(express.myMiddleWare()) | |
app.post('/', (req, res) => { |
import * as jwt from 'jsonwebtoken'; | |
const encData = jwt.sign({ name: 'Kautzmann', process.env.SECRET_KEY }); | |
const decData = jwt.verify(encData, process.env.SECRET_KEY); | |
console.log(encData, decData); |
-k
inside of it.This option allows curl to proceed and operate even for server connections otherwise considered insecure. The server connection is verified by making sure the server's certificate contains the right name and verifies successfully using the cert store.
See this online resource for further details: http://curl.haxx.se/docs/sslcerts.html
Write a function that takes in a non-empty array of integers that are sorted in ascending order and returns a new array of the same length with the squares of the original integers also sorted in ascending order.
Print the output like this: INPUT [1, 2, 3..] > OUTPUT [1, 4, 9..]
array = [1, 2, 3, 5, 6, 8, 9]
Given an array of positive integers representing the values of coins in your possession, | |
write a function that returns the minimum amount of change (the minimum sum of money) that you CANNOT create. | |
The given coins can have any positive integer value and aren't necessarily | |
unique (i.e., you can have multiple coins of the same value). | |
Examples: | |
``` | |
> {"coins": [5, 7, 1, 1, 2, 3, 22]} -> 20 | |
> {"coins": [1, 1, 1, 1, 1]} -> 6 |