This file contains hidden or 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
// # = Preprocessor macros | |
#ifdef GL_ES // OpenGL Embedded systems needed for openGL on web and mobile devices | |
precision mediump float; // level of precision for float https://stackoverflow.com/questions/13780609/what-does-precision-mediump-float-mean | |
// Lower precision means faster compilation but lower quality, above sets all floats to medium precision | |
#endif | |
void main() // Main entry point function like c/c++ | |
{ | |
// gl_FragColor = built in global variable to determine pixel color | |
// werid because you don't see it imported or extended it just exists |
This file contains hidden or 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
import flixel.FlxG; | |
import flixel.FlxObject; | |
import flixel.FlxSprite; | |
import flixel.addons.util.FlxFSM; | |
/** | |
* Example of how to use the FlxFSM addon. | |
* For more informtaion on this file check this youtube video. | |
* | |
* @see Video-TBA |
This file contains hidden or 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
import { Provider } from "react-redux"; | |
import configureStore from "redux-mock-store"; | |
// ... | |
describe('App', () => { | |
// ... | |
describe('Question', () => { | |
// - setup redux store |
This file contains hidden or 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
import * as Store from "./AppContext"; | |
// ... | |
describe('App', () => { | |
// ... | |
describe('Question', () => { | |
// - context spy | |
const contextValues = { chosenAnswers: [], setChosenAnswers: () => {} }; |
This file contains hidden or 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
// AppContext.js | |
import { createContext, useContext } from "react"; | |
export const Store = createContext(); | |
export const useAppContext = () => useContext(Store); |
This file contains hidden or 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
// App.jsx | |
import React, { Fragment } from "react"; | |
// Context | |
import { Store, useAppContext } from "./AppContext"; | |
// - Data | |
import data from "./data.json"; | |
export default function App() { |
This file contains hidden or 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
// ... | |
describe("App", () => { | |
const wrapper = mount(<App />); | |
// ... | |
test("Contains a Start and a Finish page", () => { | |
// - when | |
const startComp = wrapper.find("Start"); |
This file contains hidden or 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
// App.jsx | |
import React, { Fragment } from "react"; | |
// - Data | |
import data from "./data.json"; | |
export default function App() { | |
function renderQuestions() { | |
return data.results.map((result, index) => ( |
This file contains hidden or 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
// App.test.js | |
import React from "react"; | |
import Enzyme, { mount } from "enzyme"; | |
import Adapter from "enzyme-adapter-react-16"; | |
import data from "./data.json"; | |
import App from "./App"; | |
Enzyme.configure({ adapter: new Adapter() }); |
This file contains hidden or 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
// App.jsx | |
import React, { Fragment } from "react"; | |
// - Data | |
import data from "./data.json"; | |
export default function App() { | |
function renderQuestions() { | |
return data.results.map((result, index) => ( |