$ brew cask upgrade visual-studio-code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- assets | |
- fonts | |
- images | |
- navigations | |
- PrivateNavigator.ts | |
- PublicNavigator.ts | |
- RootNavigator.ts | |
- components | |
- Button | |
- Button.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew upgrade --cask visual-studio-code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://stackoverflow.com/questions/59018071/mock-usedispatch-in-jest-and-test-the-params-with-using-that-dispatch-action-in/61875674#61875674 | |
https://dev.to/fredrikbergqvist/mocking-redux-useselector-hook-2ale | |
https://redux.js.org/recipes/writing-tests#connected-components | |
https://ttfb.test.traveloka.com/testing-react-component-using-enzyme-jest-part-4/ | |
https://gist.github.com/krawaller/e5d40217658fa132f3c3904987e467cd | |
https://dev.to/zaklaughton/the-only-3-steps-you-need-to-mock-an-api-call-in-jest-39mb | |
https://www.loupetestware.com/post/mocking-api-calls-with-jest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
1. Initialize left=1 & Right=n | |
2. Calculate mid = Math.floor((left + right) / 2); | |
2. If mid*mid = n, then n is Perfect Square | |
3. Else if mid*mid > n then right = mid - 1 | |
4. Else if mid*mid < n then left = mid + 1 | |
*/ | |
const perfectSquare = (number) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var p=Array.prototype.slice.call(document.querySelectorAll(".fc-ab-root"));p.forEach(function(o){o.parentNode.removeChild(o)}),document.body.style.overflow="auto"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="text" readonly="readonly" onfocus="javascript: this.removeAttribute('readonly')"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch("https://www.hepsiburada.com/siparislerim/api/orders?skip=0") | |
.then(response => response.json()) | |
.then(result => { | |
var maxSkip = result.MaxSkip; | |
var increase = 10; | |
if (maxSkip === 0) { | |
var totalAmount = 0; | |
for (let index = 0; index < result.Orders.length; index++) { | |
totalAmount += parseInt(result.Orders[index].TotalAmount.Value); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch("https://www.hepsiburada.com/siparislerim/api/orders?skip=0").then(function(r){return r.json()}).then(function(r){var e=r.MaxSkip;if(0===e){for(var n=0,a=0;a<r.Orders.length;a++)n+=parseInt(r.Orders[a].TotalAmount.Value);console.log("Toplam Hepsiburada.com harcamaniz: ",n.toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,"),"TL")}else{(function(r,e){for(var n=[],a=0;a<r+e;a+=e)n.push(fetch("https://www.hepsiburada.com/siparislerim/api/orders?skip=".concat(a)).then(function(r){return r.json()}).then(function(r){for(var e=0,n=0;n<r.Orders.length;n++)e+=parseInt(r.Orders[n].TotalAmount.Value);return e}));return Promise.all(n)})(e,10).then(function(r){var e=r.reduce(function(r,e){return r+e},0).toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,");console.log("Toplam Hepsiburada.com harcamaniz: ",e,"TL")})}}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
process.env.NODE_ENV = "test"; | |
import * as mongoose from "mongoose"; | |
import config from "../../config"; | |
import { ALREADY_MEMBER_EMAIL, INVITE_EMAIL, mockUser } from "../../utils/test.utils"; | |
import userService from "./users.service"; | |
describe("Users Service", () => { | |
let _mailConfirm: string; | |
let userToken: any = {}; | |
beforeAll(done => { | |
mongoose.connect( |
NewerOlder