Reference Source Test

test/integration-test/src/Export/Variable.test.js

  1. import assert from 'assert';
  2. import {find} from '../../util';
  3.  
  4. describe('test/Export/Variable:', ()=>{
  5. it('is exported that default export', ()=>{
  6. const doc = find('longname', 'src/Export/Variable.js~testExportVariable1');
  7. assert.equal(doc.export, true);
  8. });
  9.  
  10. it('is exported that named export', ()=>{
  11. const doc = find('longname', 'src/Export/Variable.js~testExportVariable2');
  12. assert.equal(doc.export, true);
  13. });
  14.  
  15. it('is not exported that non export', ()=>{
  16. const doc = find('longname', 'src/Export/Variable.js~testExportVariable3');
  17. assert.equal(doc.export, false);
  18. });
  19.  
  20. it('is exported that indirect named export', ()=>{
  21. const doc = find('longname', 'src/Export/Variable.js~testExportVariable4');
  22. assert.equal(doc.export, true);
  23. });
  24.  
  25. it('is exported that multiple named export', ()=>{
  26. const [doc1, doc2] = find('longname',
  27. 'src/Export/Variable.js~testExportVariable5',
  28. 'src/Export/Variable.js~testExportVariable6'
  29. );
  30.  
  31. assert.equal(doc1.export, true);
  32. assert.equal(doc2.export, true);
  33. });
  34.  
  35. describe('array destructuring name export', ()=>{
  36. it('is export that first', ()=>{
  37. const doc = find('longname', 'src/Export/Variable.js~testExportVariable7');
  38. assert.equal(doc.export, true);
  39. });
  40.  
  41. xit('is export that second', ()=>{
  42. // const doc = find('longname', 'src/Export/Variable.js~testExportVariable8');
  43. // assert.equal(doc.export, true);
  44. });
  45. });
  46.  
  47. describe('object destructuring name export', ()=>{
  48. it('is export that first', ()=>{
  49. const doc = find('longname', 'src/Export/Variable.js~testExportVariable9');
  50. assert.equal(doc.export, true);
  51. });
  52.  
  53. xit('is export that second', ()=>{
  54. // const doc = find('longname', 'src/Export/Variable.js~testExportVariable10');
  55. // assert.equal(doc.export, true);
  56. });
  57. });
  58. });