But when testing a Stripe form that is impossible because Stripe doesn't want you to add a "name" attribute to credit card form elements so they don't post to the server. So how would I test and input that looked something like:
Stripe does this for security reasons. By not including the name it prevents it from hitting your server when the form is submitted. That is where the Stripe.js file comes in. It takes the data entered and converts it to a token that is sent when the form is submitted. You then take this token and create the charge.
Your test, in this case, would be hitting their Stripe.card.validateCardNumber validator and seeing the return results.