Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a few tests & fix the macros-order rule #2067

Closed
wants to merge 1 commit into from

Conversation

43081j
Copy link
Contributor

@43081j 43081j commented Dec 29, 2022

It looks like the macros ordering rule has a bug in it, in that this test fails in master:

      code: `
        <script setup>
          defineEmits(['update:test'])
          console.log('test1')
          defineProps({ test: Boolean })
        </script>
      `,
      output: `
        <script setup>
          defineEmits(['update:test'])
          defineProps({ test: Boolean })
          console.log('test1')
        </script>
      `,
      options: optionsEmitsFirst,

the output actually ends up as:

        <script setup>
          defineProps({ test: Boolean })
          defineEmits(['update:test'])
          console.log('test1')
        </script>

which contradicts the options passed (emits then props).

also added a few tests to cover some gaps elsewhere

@ota-meshi
Copy link
Member

Thank you for this PR.
This PR seems to contain multiple intent changes. Could you please split the PR to make the changes easier to understand?

@43081j
Copy link
Contributor Author

43081j commented Jan 7, 2023

#2070
#2071
#2072

@43081j
Copy link
Contributor Author

43081j commented Jan 7, 2023

closing this since the other 3 replace it.

@43081j 43081j closed this Jan 7, 2023
@43081j 43081j deleted the some-tests branch January 7, 2023 13:46
@ota-meshi
Copy link
Member

Thanks 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants