Skip to content

Commit

Permalink
test: initial test checking how do it
Browse files Browse the repository at this point in the history
  • Loading branch information
thoroc committed Jun 23, 2024
1 parent 12c9fa5 commit 16aff28
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions dynamodb/tests/hasProperties.test.w
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
bring expect;
bring aws;
bring cloud;
bring ex;
bring "../dynamodb-types.w" as dynamodb_types;
bring "../dynamodb.sim.w" as dynamodb_sim;
bring "../dynamodb.w" as dynamodb;

let tableWithBillingModeProvisioned = new dynamodb.Table({
billingMode: dynamodb_types.BillingMode.PROVISIONED,
attributes: [
{ name: "id", type: "S" },
],
hashKey: "id",
});

let simClient = dynamodb_sim.Util.createClient({
endpoint: "http://localhost:8000",
region: "us-west",
credentials: {
accessKeyId: "accessKeyId",
secretAccessKey: "secretAccessKey",
},
});

test "Sim: table with billing mode `provisioned`" {

let tableDescription = simClient.describeTable({
TableName: tableWithBillingModeProvisioned.tableName,
});

expect.equal(
tableDescription.billingMode,
dynamodb_types.BillingMode.PROVISIONED
);
}

0 comments on commit 16aff28

Please sign in to comment.