Created
          April 3, 2023 02:04 
        
      - 
      
- 
        Save mitchallen/4a866a299ce0a69671fbbec9b9a3ddf7 to your computer and use it in GitHub Desktop. 
    An example of testing a main component
  
        
  
    
      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
    
  
  
    
  | "use strict"; | |
| var assert = require('assert'); | |
| const demoMain = require('..'); | |
| describe('demo-main', function () { | |
| context('smoke test', function () { | |
| it('should add first two numbers and subtract the third', function (done) { | |
| const a = 100, b = 200, c = 50; | |
| const expected = a + b - c; | |
| assert.strictEqual(demoMain( a, b, c ), expected ); | |
| done(); | |
| }); | |
| }); | |
| }); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment