2021-01-01から1年間の記事一覧
amplify push時の質問によって修正されるファイル 質問 Do you want to update code for your updated GraphQL API? Do you want to generate GraphQL statements (queries, mutations and subscription) based on your schema type? 1と2両方Yesを選択した…
概要 AWS AppSync + DynamoDB構成で、Filterを使用してデータを取得する際の注意点。 注意点 前提 DynamoDBの1 回のScanリクエストで、取得出来る最大サイズは1 MBのデータ。DynamoDB でのスキャンの操作 - Amazon DynamoDB AppSync(GraphQL)のFilterで取得…
概要 AWS API Gateway + Lambda構成のペイロード制限での注意点。 注意点 前提 API Gatewayのペイロードサイズ上限は、10MB。Amazon API Gateway のクォータと重要な注意点 - Amazon API Gateway Lambdaのペイロードサイズ上限は、6MB。Lambda クォータ - AW…
概要 Jestでaxiosの処理をモック化する方法。 モック化の方法 テスト対象の関数(axiosGetTest, axiosPostTestData) <template> <div> <div>{{ axiosGetTestData }}</div> <div>{{ axiosPostTestData }}</div> </div> </template> <script lang="ts"> import { Component, Vue } from 'nuxt-property-decorator'; @Component({}) export…
概要 JestでVuexの処理をモック化する方法。 モック化の方法 テスト対象の関数(vuexTest) <template> <div> <div>{{ vuexTestData }}</div> </div> </template> <script lang="ts"> import { Component, Vue } from 'nuxt-property-decorator'; import { clientStore } from '~/store'; @Component({}) export default clas…
概要 Jestでマウントせずに、関数のみ実行してテストする方法。 方法 基本形 import 任意の名前1 "@/pages/ファイル名"; describe("任意の名前2", () => { it("任意の名前3", () => { const thisVal = {}; 任意の名前1.options.methods.テスト対象の関数名.c…