@takepepeさんによるnextjs-testing-strategy-2022などで使われているテクニックの紹介
※uhyo本なども参照
APIからの返り値や外部ファイルの読み込み結果など、一定の形式を想定しているものの外部リソースなのでそのままでは型を保証できない(anyやunknownになる)値を取り扱わないといけないケースは多い
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[source]] | |
url = "https://pypi.org/simple" | |
verify_ssl = true | |
name = "pypi" | |
[packages] | |
fastapi = "*" | |
pydantic = "*" | |
orjson = "*" | |
uvicorn = "*" |
参考: https://github.com/junkor-1011/cognito-authorizer-test-clibase
トークン生成前トリガーを使うことにより、Cognitoの認証時に得られるidTokenのクレームをカスタマイズすることが出来る。 後々のため、この機能についてaws cdkを使って立ち上げと動作確認を行う。
- aws cdkのcdk pipelineを使ってgitリモートリポジトリ(codecommit)と連携したpipelineを組む
- cdkとLambda(その1)はTypeScriptで記述、Lambda(その2)はDockerfileを使ってImageタイプで作成
リポジトリ: https://github.com/junkor-1011/cdk-sample-ts-lambda/tree/article_cdkpipelinetest_20220725
↑cloneして編集したらデプロイ用のブランチ名はmainに変える想定になっている
(追記)ダメっぽい
- 記載の通りでUbuntu22.04LTS
- ASUS Mini-PC-PN51 にインストール
- たまにDesktop用途でも使うのでDesktop版だが、基本はSSHして使う
- network周りはWiFi接続のみで何とかしようとしている
- (有線環境があるのが無難だとは思うが)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
env: { | |
browser: true, | |
es2021: true, | |
node: true, | |
jest: true, | |
}, | |
extends: [ | |
'eslint:recommended', | |
'airbnb', |