Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable preview domain in cli #239

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/services/twilio-api/api-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class TwilioApiBrowser {

apiSpec = fs
.readdirSync(__dirname)
.filter((filename) => filename.match(specPattern) && !filename.match('twilio_preview.json'))
.filter((filename) => filename.match(specPattern))
.map((filename) => {
const domainName = filename.match(specPattern)[specNameIndex];

Expand Down
12 changes: 7 additions & 5 deletions test/services/twilio-api/api-browser.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ describe('services', () => {
expect(browser.domains.api.paths['/2010-04-01/Accounts/{AccountSid}/Calls.json'].operations.post).to.exist;
expect(browser.domains.api.paths['/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json'].operations.get).to.exist;
});

test.it('loads the JSON from disk except for preview', () => {
const browser = new TwilioApiBrowser();
expect(browser.domains.api.paths['/BulkExports/Exports/Jobs/{JobSid}']).to.not.exist;
});
/*
* enable it after one build is done, and the path is loaded.
* test.it('loads the JSON from disk for preview', () => {
* const browser = new TwilioApiBrowser();
* expect(browser.domains.api.paths['/BulkExports/Exports/Jobs/{JobSid}']).to.exist;
* });
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we are disabling this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path doesnt exist right now, its undefined, I am guessing that we can enable this after one release that has preview.


test.it('loads JSONs split by version', () => {
const browser = new TwilioApiBrowser();
Expand Down
Loading