I hereby claim:
- I am novascreen on github.
- I am novascreen (https://keybase.io/novascreen) on keybase.
- I have a public key ASBt0Xe3dQwM9vWHOTQwLOkGdkIDf0t99q8rDI1EQCfPywo
To claim this, I am signing this object:
| import { redact } from './redact' | |
| test('replaces given paths with [Redacted]', () => { | |
| const data = { secret: '1234', nested: { secret: '5678' } } | |
| const redactedData = redact([['secret'], ['nested', 'secret']], data) | |
| const curriedRedactedData = redact([['secret'], ['nested', 'secret']])(data) | |
| expect(redactedData).toMatchInlineSnapshot(` | |
| Object { | |
| "nested": Object { |
I hereby claim:
To claim this, I am signing this object:
If you use Storybook with Next.js and have components using next/link you'll have to mock next/router the same you would for testing with Jest or others. Simply create a file with the mock router as shown below and import it in your Storybook config.
This is based on some information from an issue on Next.js:
| module.exports = { | |
| config: { | |
| // default font size in pixels for all tabs | |
| fontSize: 13, | |
| // font family with optional fallbacks | |
| fontFamily: 'Hack, Monaco, Menlo, "DejaVu Sans Mono", "Lucida Console", monospace', | |
| // terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) | |
| cursorColor: 'rgba(248,28,229,0.8)', |
| module.exports = { | |
| config: { | |
| // default font size in pixels for all tabs | |
| fontSize: 13, | |
| // font family with optional fallbacks | |
| fontFamily: 'Hack, Monaco, Menlo, "DejaVu Sans Mono", "Lucida Console", monospace', | |
| // terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) | |
| cursorColor: 'rgba(248,28,229,0.8)', |
| const path = require('path'); | |
| const fs = require('fs-extra'); | |
| const pkg = require('./package.json'); | |
| const SH_TEMPLATE = binPath => | |
| `#!/bin/sh | |
| basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')") | |
| case \`uname\` in | |
| *CYGWIN*) basedir=\`cygpath -w "$basedir"\`;; |
| cinst -y 7zip.install | |
| cinst -y adobe-creative-cloud | |
| cinst -y adobereader | |
| cinst -y Firefox | |
| cinst -y git | |
| cinst -y google-chrome-x64 | |
| cinst -y GoogleChrome.Canary | |
| cinst -y googledrive | |
| cinst -y IrfanView | |
| cinst -y irfanviewplugins |
| ==> default: Running provisioner: shell... | |
| C:/HashiCorp/Vagrant/embedded/gems/gems/winrm-fs-0.2.0/lib/winrm-fs/core/command_executor.rb:59:in `assert_command_success': uninitialized constant WinRM::FS::Core::CommandExecutor::WinRMUploadError (NameError) | |
| from C:/HashiCorp/Vagrant/embedded/gems/gems/winrm-fs-0.2.0/lib/winrm-fs/core/command_executor.rb:47:in `run_cmd' | |
| from C:/HashiCorp/Vagrant/embedded/gems/gems/winrm-fs-0.2.0/lib/winrm-fs/core/command_executor.rb:38:in `run_powershell' | |
| from C:/HashiCorp/Vagrant/embedded/gems/gems/winrm-fs-0.2.0/lib/winrm-fs/core/upload_orchestrator.rb:97:in `remote_checksum' | |
| from C:/HashiCorp/Vagrant/embedded/gems/gems/winrm-fs-0.2.0/lib/winrm-fs/core/upload_orchestrator.rb:86:in `out_of_date?' | |
| from C:/HashiCorp/Vagrant/embedded/gems/gems/winrm-fs-0.2.0/lib/winrm-fs/core/upload_orchestrator.rb:40:in `block in upload_file' | |
| from C:/HashiCorp/Vagrant/embedded/gems/gems/winrm-fs-0.2.0/lib/winrm-fs/core/upload_orchestrator.rb:72:in `wi |
| # Basic setup | |
| Update-ExecutionPolicy Unrestricted | |
| Set-WindowsExplorerOptions -EnableShowHiddenFiles -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
| Enable-RemoteDesktop | |
| Disable-InternetExplorerESC | |
| Disable-UAC | |
| Set-TaskbarOptions -Size small | |
| # Install-WindowsUpdate -AcceptEula |