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
const assert = require('assert'); | |
const tap = require('tap'); | |
tap.test('Needs plan', function () { | |
if (someCondition) { | |
assert(anotherCondition, 'another message'); | |
} | |
}); | |
tap.test('Does not need plan', function () { |
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
const assert = require('assert'); | |
const tap = require('tap'); | |
tap.test('Simple assert', function () { | |
assert(1+1 === 2, 'addition is broken again'); | |
}); |
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
setTimeout(function () { | |
describe('dynamic suite', function () { | |
it('should run', function () { | |
console.log('it also ran'); | |
}); | |
}); | |
}, 1000); |
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 React from 'react'; | |
import PropTypes from 'prop-types'; | |
import {graphql, QueryRenderer} from 'react-relay'; | |
import environment from '@/environment'; | |
import PageBar from '@/components/PageBar'; | |
import Loading from '@/components/Loading'; | |
import OrderTableRelay from '@/components/OrderTableRelay'; | |
const manageOrdersQuery = graphql` |
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 React from 'react'; | |
import PropTypes from 'prop-types'; | |
import {graphql, QueryRenderer, createPaginationContainer} from 'react-relay'; | |
import {Button} from 'react-bootstrap'; | |
import environment from '@/environment'; | |
import PageBar from '@/components/PageBar'; | |
import Loading from '@/components/Loading'; | |
import OrderTableRelay from '@/components/OrderTableRelay'; |
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
const manageOrdersQuery = graphql` | |
query ManageOrdersRelayQuery { | |
orders(first: 10){ | |
edges { | |
node { | |
...OrderTableRelay_order | |
} | |
} | |
} | |
} |
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 React from 'react'; | |
import PropTypes from 'prop-types'; | |
import {Table} from 'react-bootstrap'; | |
import R from 'ramda'; | |
import {graphql, createFragmentContainer} from 'react-relay'; | |
import utils from '@/utils'; | |
import constants from '@/constants'; | |
import Status from '@/components/Status'; |
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 React from 'react'; | |
import PropTypes from 'prop-types'; | |
import {graphql, QueryRenderer} from 'react-relay'; | |
import environment from '@/environment'; | |
import PageBar from '@/components/PageBar'; | |
import Loading from '@/components/Loading'; | |
const manageOrdersQuery = graphql` | |
query ManageOrdersRelay { |
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 fetch from 'isomorphic-fetch'; | |
import {Environment, Network, RecordSource, Store, RecordSourceInspector} from 'relay-runtime'; | |
const source = new RecordSource(); | |
const store = new Store(source); | |
const inspector = new RecordSourceInspector(source); | |
const network = Network.create((operation, variables) => ( | |
fetch('http://localhost/api/v2/graphql/'), { | |
method: 'POST', |
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
def resolve_orders(self, args, context, info): | |
return models.Order.objects.prefetch_related(‘line_items’).all() |
NewerOlder