Merge branch 'main' into update_solutions

This commit is contained in:
Eric Olkowski 2023-01-21 12:55:06 -05:00 committed by GitHub
commit a092bf0559
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 140 additions and 18 deletions

54
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View file

@ -0,0 +1,54 @@
---
name: Bug Report
about: Create a report to help us improve something that is not working correctly
title: "Bug - :"
labels: "Status: Needs Review, Type: Bug"
assignees: ""
---
<!-- Thank you for taking the time to submit a bug report to The Odin Project. In order to get issues closed in a reasonable amount of time, you must include a baseline of information about the bug in question. Please read this template in its entirety before filling it out to ensure that it is filled out correctly. -->
Complete the following REQUIRED checkboxes:
- [ ] I have thoroughly read and understand [The Odin Project Contributing Guide](https://github.com/TheOdinProject/theodinproject/blob/main/CONTRIBUTING.md)
- [ ] The title of this issue follows the `Bug - location of bug: brief description of bug` format, e.g. `Bug - Exercises: File type incorrect for all test files`
The following checkbox is OPTIONAL:
<!-- Completing this checkbox does not guarantee you will be assigned this issue, but rather lets us know you are interested in working on it. -->
- [ ] I would like to be assigned this issue to work on it
<hr>
**1. Description of the Bug:**
<!-- A clear and concise description of what the bug is. Include any screenshots that may help show the bug in action. -->
**2. How To Reproduce:**
<!--
What steps one might need to take in order to reproduce this bug, e.g.:
1. Log in
2. Visit a lesson page
3. Click the complete button
4. The complete button does not update
-->
**3. Expected Behavior:**
<!--
A brief description of what you expected to happen, e.g.:
1. Log in
2. Visit a lesson page
3. Click the complete button
4. The complete button updates correctly
-->
**4. Desktop/Device:**
<!-- The more information you are able to provide, the better. -->
- Device: <!-- [e.g. iPhone6] -->
- OS: <!-- [e.g. iOS] -->
- Browser: <!-- [e.g. chrome, safari] -->
- Version: <!-- [e.g. 22] -->
**5. Additional Information:**
<!-- Any additional information about the bug. -->

View file

@ -0,0 +1,38 @@
---
name: Feature Request
about: Suggest a new feature or enhancement for this project
title: ""
labels: "Status: Needs Review"
assignees: ""
---
<!-- Thank you for taking the time to submit a new feature request to The Odin Project. In order to get issues closed in a reasonable amount of time, you must include a baseline of information about the feature/enhancement you are proposing. Please read this template in its entirety before filling it out to ensure that it is filled out correctly. -->
Complete the following REQUIRED checkboxes:
- [ ] I have thoroughly read and understand [The Odin Project Contributing Guide](https://github.com/TheOdinProject/theodinproject/blob/main/CONTRIBUTING.md)
- [ ] The title of this issue follows the `location for request: brief description of request` format, e.g. `Exercises: Add exercise on XYZ`
The following checkbox is OPTIONAL:
<!-- Completing this checkbox does not guarantee you will be assigned this issue, but rather lets us know you are interested in working on it. -->
- [ ] I would like to be assigned this issue to work on it
<hr>
**1. Description of the Feature Request:**
<!--
A clear and concise description of what the feature or enhancement is, including how it would be useful/beneficial or what problem(s) it would solve.
-->
**2. Acceptance Criteria:**
<!--
A list of checkbox items that explain the requirements needed to be met to resolve this request, e.g.:
- [ ] A theme toggle is present on the dashboard
- [ ] Clicking the theme toggle changes between light and dark
- [ ] A user's theme choice persists after leaving the website
-->
**3. Additional Information:**
<!-- Any additional information about the feature request, such as a link to a Discord discussion, screenshots, etc. -->

32
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,32 @@
<!-- Thank you for taking the time to contribute to The Odin Project. In order to get this pull request (PR) merged in a reasonable amount of time, you must complete this entire template. -->
## Because
<!-- Summarize the purpose or reasons for this PR, e.g. what problem it solves or what benefit it provides. -->
## This PR
<!-- A bullet point list of one or more items describing the specific changes. -->
## Issue
<!--
If this PR closes an open issue in this repo, replace the XXXXX below with the issue number, e.g. Closes #2013.
If this PR closes an open issue in another TOP repo, replace the #XXXXX with the URL of the issue, e.g. Closes https://github.com/TheOdinProject/curriculum/issues/XXXXX
If this PR does not close, but is related to another issue or PR, you can link it as above without the 'Closes' keyword, e.g. 'Related to #2013'.
-->
Closes #XXXXX
## Additional Information
<!-- Any other information about this PR, such as a link to a Discord discussion. -->
## Pull Request Requirements
<!-- Replace the whitespace between the square brackets with an 'x', e.g. [x]. After you create the PR, they will become checkboxes that you can click on. -->
- [ ] I have thoroughly read and understand [The Odin Project Contributing Guide](https://github.com/TheOdinProject/theodinproject/blob/main/CONTRIBUTING.md)
- [ ] The title of this PR follows the `location of change: brief description of change` format, e.g. `01_helloWorld: Update test cases`
- [ ] The `Because` section summarizes the reason for this PR
- [ ] The `This PR` section has a bullet point list describing the changes in this PR
- [ ] If this PR addresses an open issue, it is linked in the `Issue` section
- [ ] If this PR includes changes that needs to be updated on the `solutions` branch, I have created another PR (and linked it to this PR).

View file

@ -2,12 +2,12 @@
Write two functions that convert temperatures from Fahrenheit to Celsius, and vice versa:
```
ftoc(32) // fahrenheit to celsius, should return 0
convertToCelsius(32) // fahrenheit to celsius, should return 0
ctof(0) // celsius to fahrenheit, should return 32
convertToFahrenheit(0) // celsius to fahrenheit, should return 32
```
Because we are human, we want the result temperature to be rounded to one decimal place: i.e., `ftoc(100)` should return `37.8` and not `37.77777777777778`.
Because we are human, we want the result temperature to be rounded to one decimal place: i.e., `convertToCelsius(100)` should return `37.8` and not `37.77777777777778`.
This exercise asks you to create more than one function so the `module.exports` section of the spec file looks a little different this time. Nothing to worry about, we're just packaging both functions into a single object to be exported.

View file

@ -1,13 +1,11 @@
const ftoc = function() {
const convertToCelsius = function() {
};
const ctof = function() {
const convertToFahrenheit = function() {
};
// Do not edit below this line
module.exports = {
ftoc,
ctof
convertToCelsius,
convertToFahrenheit
};

View file

@ -1,25 +1,25 @@
const {ftoc, ctof} = require('./tempConversion')
const {convertToCelsius, convertToFahrenheit} = require('./tempConversion')
describe('ftoc', () => {
describe('convertToCelsius', () => {
test('works', () => {
expect(ftoc(32)).toEqual(0);
expect(convertToCelsius(32)).toEqual(0);
});
test.skip('rounds to 1 decimal', () => {
expect(ftoc(100)).toEqual(37.8);
expect(convertToCelsius(100)).toEqual(37.8);
});
test.skip('works with negatives', () => {
expect(ftoc(-100)).toEqual(-73.3);
expect(convertToCelsius(-100)).toEqual(-73.3);
});
});
describe('ctof', () => {
describe('convertToFahrenheit', () => {
test.skip('works', () => {
expect(ctof(0)).toEqual(32);
expect(convertToFahrenheit(0)).toEqual(32);
});
test.skip('rounds to 1 decimal', () => {
expect(ctof(73.2)).toEqual(163.8);
expect(convertToFahrenheit(73.2)).toEqual(163.8);
});
test.skip('works with negatives', () => {
expect(ctof(-10)).toEqual(14);
expect(convertToFahrenheit(-10)).toEqual(14);
});
});