File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
spec/types_from_serializers
types_from_serializers/lib/types_from_serializers Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ bundle install
1212pnpm install
1313```
1414
15+ ```
16+ pnpm migrate
17+ ```
18+
1519## Making sure your changes pass all tests
1620
1721There are a number of automated checks which run on GitHub Actions when a pull request is created.
@@ -24,11 +28,13 @@ pnpm lint
2428```
2529
2630### 2. Check the code for Ruby style violations
31+
2732```
2833bin/rubocop
2934```
3035
3136### 3. Run the test suite
37+
3238```
3339bin/rspec
3440```
Original file line number Diff line number Diff line change @@ -116,6 +116,14 @@ def generate_serializers
116116 expect ( ts_type ) . to eq ( :string )
117117 end
118118
119+ it "maps uuid type from SQL to string type in TypeScript" do
120+ db_type = :uuid
121+
122+ ts_type = TypesFromSerializers . config . sql_to_typescript_type_mapping [ db_type ]
123+
124+ expect ( ts_type ) . to eq ( :string )
125+ end
126+
119127 it "maps json type from SQL to object type in TypeScript" do
120128 db_type = :json
121129
Original file line number Diff line number Diff line change @@ -392,6 +392,7 @@ def default_config(root)
392392 string : :string ,
393393 text : :string ,
394394 citext : :string ,
395+ uuid : :string ,
395396 json : "Record<string, any>" ,
396397 jsonb : "Record<string, any>" ,
397398 } . tap do |types |
You can’t perform that action at this time.
0 commit comments