-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e921621
commit 098ff97
Showing
2 changed files
with
15 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
import * as React from 'react'; | ||
import * as R from 'ramda'; | ||
import { expect } from 'chai'; | ||
const md = require('./example.md?tagged-prose').default; | ||
import * as React from 'react' | ||
import * as R from 'ramda' | ||
import { expect } from 'chai' | ||
const md = require('./example.md?tagged-prose').default | ||
|
||
describe('Tagged Prose Loader', () => { | ||
it('Returns the expected keys', () => { | ||
expect(R.keys(md)).eql([ 'refund_process', 'ach_payment_pending' ]); | ||
}); | ||
expect(R.keys(md)).eql([ 'refund_process', 'ach_payment_pending' ]) | ||
}) | ||
|
||
it('Generates FAQ components for #refund_process', () => { | ||
const question = "I've returned a purchase. How does the refund process work?"; | ||
const question = "I've returned a purchase. How does the refund process work?" | ||
const answer = ( | ||
"Returns are subject to the merchant's return policy. As soon as the merchant " + | ||
"processes your return, Affirm will record the refund. If you receive a full " + | ||
'processes your return, Affirm will record the refund. If you receive a full ' + | ||
"refund, you'll no longer need to make payments." | ||
); | ||
) | ||
|
||
expect(md.refund_process).eql({ | ||
name: 'refund_process', | ||
question: <div>{question}</div>, | ||
answer: <div>{answer}</div>, | ||
text: { question, answer }, | ||
}); | ||
}); | ||
}); | ||
}) | ||
}) | ||
}) |
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